Click to See Complete Forum and Search --> : Process.Start question


ricolee99
July 2nd, 2004, 05:07 PM
Hi,

I'm writing an ASP.net app using C# and i'm writing a simple code where i click a button I want the browser to open.

Here's the code:



Process test = Process.Start("C:\\DRIVERS\\AUD\\L400\\setup.exe");



Unfortunately, when I click on the button in the webpage, the browser seems to be thinking, i get a progress bar at the bottom of the browser, but the progress bar stops in the middle.

Can someone please help me? I know that running .exe manually works because i've tried it so it can't be the .exe that's causing the problem...

Thanks

Rico

Alexei Kubarev
July 3rd, 2004, 09:16 AM
how about trying Process.Start("file:///C:\\DRIVER\\....");
You know, starting the proccess object with a file:/// or smth... like it happends in IE if you open some local file...

Try :)

ricolee99
July 5th, 2004, 11:13 AM
Hi Alexei,

It looks like placing the "file:///C:\\DRIVER\\...." is still causing the browser to wait for a long period of time, and then nothing happens...

Alexei Kubarev
July 5th, 2004, 11:35 AM
I might have written a bit wrong... All of the slashes must look like //, but there should be 3 of them after the file:...

So it would be like this: file:///C://DRIVER//..

try this.. :) im not sure its going to work..

ricolee99
July 5th, 2004, 11:44 AM
Thanks Alexei,

But i'm still not having luck with the switched slashes..


Rico

ricolee99
July 5th, 2004, 01:01 PM
Hi everyone,

So what happens is if I write the code in C# console application or web applicaton:

Process.Start ("http://www.microsoft.com");

The code works and opens up the microsoft website.

When I write the same code in an ASP.net using C# application, I get a server error message, saying:

"The system cannot find the file specified"

I've tried modifying the url to be: "http:////www.microsoft.com"

but still no luck. I've been stumped for a couple of days.

Can anyone please help me?

Thanks

Rico

Andy Tacker
July 6th, 2004, 05:08 AM
is ASP.NET, you use...

Response.Redirect("http://www.microsoft.com");

mikko
July 15th, 2004, 03:37 PM
I believe the page needs to have permissions to access the application. try placing it in the bin folder to run.