Run exe from aspx page

A

amitbisht007

Well GoodMorning,

Myself Amit bisht a new joinee this group require a help.

well my problem is that:
I have an exe in charp which i want to call from aspx page on button
click.
(for example calculater or notepad exe via command line)
what the code i had add on bitton clickis like this:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
proc.StartInfo.FileName=@"C:\csharp\execute\LeapYear\Class1.exe";
proc.StartInfo.Arguments ="1002";
proc.Start();
proc.WaitForExit(1000);
if(!proc.HasExited)
proc.Kill();

so when i try to execute my application and click the button exe is not
lunched as this exe update database which is not reflecting after click
button.

Please help me.
Regards
Amit Bisht
Ass. s/w developer
 
G

Guest

more then likely it's a security problem. The user that IIS and ASP.NET are
running under needs the proper permissions to execute the exe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top