-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: sachingpatel
Message 10 in Discussion


I want to start the calc.exe from Web Server.  
I have created a Web Application project using c#.  On Page's load event i 
am calling calc.exe.  It starts the calc.exe but i am not able to see 
it.  When i goto Task mamanger.->processes, there it shows calc.exe as a 
process.  Even i am not able to end that process as it is running under 
ASPNET account.  
 
Following is the code behind file.
 


using System;

using System.Collections;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Web;

using System.Web.SessionState;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.HtmlControls;

using System.DirectoryServices;

using System.Diagnostics;

namespace Messanger

{

/// 
<summary>

/// 
Summary description for WebForm1.

/// 
</summary>

public class Messanger : 
System.Web.UI.Page

{

protected 
System.Web.UI.WebControls.Label Label1;

protected 
System.Web.UI.WebControls.TextBox txtComputer;

protected 
System.Web.UI.WebControls.Label Label2;

protected 
System.Web.UI.WebControls.TextBox TextBox1;

protected 
System.Web.UI.WebControls.Label Label3;

protected 
System.Web.UI.WebControls.TextBox txtMessage;

protected 
System.Web.UI.HtmlControls.HtmlInputButton Button1; 

protected 
System.Web.UI.WebControls.DropDownList cbComputerList;



private void Page_Load(object sender, System.EventArgs e)

{

// Put user code to initialize the page 
here

Process Pr = new 
Process();

Pr.StartInfo.FileName = @"c:\winnt\system32\calc.exe";

Pr.StartInfo.Arguments = ""; 

Pr.Start(); 

}

#region Web Form Designer generated code

override protected void OnInit(EventArgs e)

{

//

// CODEGEN: This call is required by the 
ASP.NET Web Form Designer.

//

InitializeComponent();

base.OnInit(e);

}



/// 
<summary>

/// 
Required method for Designer support - do not modify

/// the 
contents of this method with the code editor.

/// 
</summary>

private void InitializeComponent()

{ 

this.Button1.ServerClick += new System.EventHandler(this.Button1_ServerClick);

this.Load += 
new 
System.EventHandler(this.Page_Load);

}

#endregion

}

}

 

sachin patel

  ----- Original Message ----- 
  From: 
  Am2pm4 
  To: BDOTNET 
  Sent: Friday, May 21, 2004 3:21 PM
  Subject: Re: How to run calc.exe from 
  asp.net using C#
  

  
    
      
      New Message on BDOTNET
    
      

  How to 
    run calc.exe from asp.net using C#


    
      
      
        Reply

        
          
            
            
               
              Reply to Sender   Recommend 
              Message 9 in 
                Discussion 
      
        
          
            
            
              From: Am2pm4 
            
              

                Hi Could you specifically tell me the WebServer 
                Problem
View other groups in this 
    category. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to