Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

Is it possible to get the javascript open file to work, is it possible to use System.Process (because I'm still going to need them to be able to print selected files), and if these are not an option, what would be a good solution within the SharePoint mindset?

Thanks

share|improve this question

closed as unclear what you're asking by Hugh Wood, John Chapman, PirateEric May 9 at 16:32

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.