Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The intent of your question is still not clear.</p> <p>Are you...</p> <p>A. trying to connect to a web application (hosted with IIS) from a client browser and access a file from a network share (relative to the server) for the client to consume?</p> <p>B. trying to connect to a web application (hosted with IIS) from a client browser and have the application access a file from the network to be used by the server (like a .txt file containing information that the application needs for some processing)?</p> <p>C. trying to connect to a web application (hosted with IIS) from a client browser and have the hosted application access a file from a network share (relative to the client) for the server to consume?</p> <p>My assumption is you are attempting (B) and if so, you should use System.IO and access your files programmatically instead of trying to launch a process.</p> <p><strong>UPDATED BELOW</strong></p> <p>If you are trying to connect to a web application, and launch a local process (such as notepad.exe) on the client you cannot do so by launching a process. Otherwise MyVirus.com could launch local processes on my machine and that would be a nightmare. The web application is only going to launch processes on the server, never the client.</p> <p>The best you can do is open the file (from the server) and send a Response back to the client with the contents of the file or send the path and file name to the client and open it via javascript or an <a href="http://blog.teamtreehouse.com/reading-files-using-the-html5-filereader-api" rel="nofollow">HTML5 FileReader</a>.</p> <p><strong>ADDITIONAL UPDATE</strong></p> <p>You should be able to open an image (or other content consumable in a browser) from a UNC path as long as you are your Application Pool Identity has permissions and also, are you using impersonation (identity impersonate="true" userName="someaccount" password="somepassword")?</p> <p><strong>ONE LAST UPDATE</strong></p> <p>Unfortunately even opening a folder location requires a local process to launch (explorer.exe). That's simply not going to happen with modern browsers for security reasons. You could cook up something wonky like a local windows service on each client machine that checks a database and if it finds x it launches the local explorer.exe to the path stored in the database... but it would have to be checking every second and that sounds like a really bad idea. </p> <p>Other than that maybe something like this <a href="http://www.telerik.com/products/aspnet-ajax/fileexplorer.aspx" rel="nofollow">File Explorer Control from Telerik</a> or this <a href="http://www.ssware.com/fileview/fileview.htm" rel="nofollow">File View Control</a> would serve your purposes. (Disclaimer, I don't know anything about either of these controls just thought they might help).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload