title: Opening a text file on the local system from an asp.net web application
body: <p>OK to add clarification after the comments posted and the fact I realise my original question was massively confusing. This is what I am trying to achieve.... </p>
  
  <p>This will be an web application running on a local intranet and not over the internet. Ultimately I want to be open a network folder location from within the the web application. So for example the web application creates folders on the file server with a set structure i.e:</p>
  
  <p>\server\jobnumber\exhibitreference\image1
  \server\jobnumber\exhibitreference\image2</p>
  
  <p>I want the user to be able to navigate to the record and click a link to open it's matching folder location. The users, web server and file server are all on the same domain.  </p>
  
  <p>The code below was just used as an example to try and get it working for a file/folder on my local machine before I moved off to trying a remote folder. I appreciate this was confusing.</p>
  
  <h2>Original question</h2>
  
  <p>I have created .Net/C# web application and I want to open a text file at a specified location. The code below is working fine when run on IIS Express but once published to IIS it does not work. </p>
  
  <p>At present IIS Express and IIS 7 are running on my local machine. The IIS application pool is configured to run under my domain account (had to do this as we have a double hop issue of authentication to SQL server) So far I have the following code:</p>
  
  <pre><code>ProcessStartInfo processStartInfo = new ProcessStartInfo();
  processStartInfo.WorkingDirectory = @"C:\Users\pcustance\Desktop\";
  processStartInfo.FileName = @"notepad.exe";
  processStartInfo.Arguments = "test.txt";
  processStartInfo.WindowStyle = ProcessWindowStyle.Maximized;
  processStartInfo.CreateNoWindow = true;
  
  Process process = Process.Start(processStartInfo);
  </code></pre>
  
  <p>Watching the system processes through task manager I can see that the process "notepad.exe" gets created successfully but no window opens. It says the process is running under "pcustance" account but I can only see it when I select "show processes from all users" in task manager.</p>
  
  <p>Is the window not launching because somehow it is being run under the wrong account?</p>
  
  <p>I have also tried:</p>
  
  <pre><code>Process.Start("C:\Users\pcustance\Desktop\test.txt");
  </code></pre>
  
  <p>As before, this works in IIS Express but not on IIS7.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <h2>Solution</h2>
  
  <p>At the moment I have had to resort to using Internet Explorer which supports the use of local links out the box. The browser can be pointed at a network location with the following:</p>
  
  <pre><code>file:///\\server\folder\location
  or 
  file://///server/folder/location
  </code></pre>