Click here to Skip to main content
15,566,394 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using VS2010 C# and testing on my local Win 7 with local IIS, I have wrote a web service to open one file from my computer, which use System.Diagnostics.Process.Start . The same codes did work when I use VS2010 build-in ASP.NET Development Server but when I use IIS normal to run Process.Start on the web service, it not doing anything

this is my code:

string path = @"D:\Data\Research\C-T-01_DotNet\Part 4 - C sharp Summary_v10.ppt";
Process proc = new Process();
proc.StartInfo = new ProcessStartInfo(path);
Updated 12-May-10 18:44pm

What do you expect this to do ? Why would you want to open a powerpoint on the server ? IIS runs as it's own user, it's probably showing this on the server ( which is retarded ) but under it's own account.

Your core issue is almost certainly that you are clueless about ASP.NET and the division between server and client, because when you run your code on a test machine, they are the same. You pass your powerpoint through the Response object to show it to a client.
Share this answer
Instead of process start, you should transfer the file to client on click event.

Or using microsoft office interop , you can convert your powerpoint file to xps file, which can be easily viewed on browser.
Share this answer
I just want to that when i click an event on website, it'll open one file.
Share this answer
You can also refer this thread.
Share this answer

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