I have created a list of scanned in docs where users can view and print documents (documents can range from PDFs, TXT, DOCX, etc). These files are scanned in from a printer and stored locally in a network path. My webpart uses dynamic URL paths to match to the file a user wishes to view. I have tried to use System.Diagnostics.Process to open the file, but SharePoint restricts this due to security (for good reason). But the files my users are viewing are heavily protected by firewall, anti-virus, folder permissions and SharePoint permissions. The needed users have rights to the files in the folder, but SharePoint is preventing me from viewing the files on button click.
After Process.Start did not work (I even tried using SPContext and SPWeb an allowing unsafe updates but no good), I tried client-side with window.open. I had something like this: window.open('file://[my file path]','_newtab');
Stand alone in a simple web page, this works in all browsers, but through SharePoint it only works in IE8 and IE9. I need this to work in all browsers, or functionality similar to this.
My client-side code resides in the WebPartUserControl.ascx file with code-behind in the WebPartUserControl.ascx.cs.