Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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);
proc.Start();
Posted 12-May-10 17:36pm
Edited 12-May-10 18:44pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I just want to that when i click an event on asp.net website, it'll open one file.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can also refer this thread.
 
http://forums.asp.net/p/1471392/3408982.aspx
  Permalink  

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

  Print Answers RSS
0 DamithSL 265
1 CPallini 235
2 OriginalGriff 233
3 Maciej Los 175
4 George Jonsson 170
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 13 May 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100