Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I need to trigger a windows application on the button click event on a website.

I have used following code ,
protected void Button1_Click1(object sender, EventArgs e)
   {

       if (calcProc != null)
           calcProc.Kill();
       calcProc = new Process();
       ProcessStartInfo i = new ProcessStartInfo();
       i.FileName = ConfigurationManager.AppSettings["path"]; ;  // Code here your win-apps path -- path will be pointing to windows application EXE.

       i.RedirectStandardOutput = true;
       i.RedirectStandardInput = true;
       i.RedirectStandardError = true;

       i.CreateNoWindow = true;
       i.UseShellExecute = false;
       calcProc.StartInfo = i;
       calcProc.Start();
   }


It's working fine before publishing,

After publishing in ISS ,It's not working,


Getting some popup error msgs on the button click.

Help me , thanks in advance..
Posted

1 solution

What does your path value contain?
Is it a relative path or absolute?

If it is absolute, make sure this file exists on the server (at the desired location).
 
Share this answer
 
Comments
Sandeep Mewara 8-Feb-11 5:28am    
Comment from OP:
Thanks for response Abhinav..
That path is pointing to valid location only and also that's executing the windows application.. That you can make sure, that executed apllication will be added in Task Manger..
But the problem is , We are not able to see.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900