"xzzy" <mr********@comcast.netwrote in message
news:4J******************************@comcast.com. ..
In the follwoing code, myProcess.StartInfo.FileName is set to a valid
path: c:\\hello.doc
The code produces the following error message: "%1 is not a valid Win32
application"
For c:\\hello.doc, I would expect the following code to open a Word
document in a normal window.
But how could it possibly do that...?
ASP.NET runs on the server, not on the client...
ASP.NET (principally) receives HttpRequests from web browsers and responds
by streaming HTML back down to the web browser...
Your code will do the following:
1) create a new Process object on the webserver
2) look for the installed application which corresponds to the supplied
filename's extension - in this case, .doc
3) try to instantiate that application and run it in the Process object - on
the server, not on the client.
ASP.NET can't open browser windows - it needs to create client-side markup
(hyperlinks or JavaScript) to do that...