1
votes

I'm using the WebBrowser control in C# to navigate to a PDF file on my company's network. When the program navigates to this file, it is logged in as a different user than my account. When this user navigates to any PDF file on the network, it gets the error "Your current security settings do not allow this file to be downloaded". If I use my account to navigate to the file, I don't receive this error.

The line that causes the message box to show is _pdfViewer.wbPDFViewer.Navigate(SelectedPath)

Here's what I've tried:

  • Changing IE Security setting for File download (of the impersonated account) to Enable on both Internet & Local Intranet (I'm not really sure which category the network falls into, guessing Local Intranet)
  • Modifying the IE security settings to exactly match mine
  • Turning off Popup Blocker
  • Checking if the network was in restricted sites - it's not
  • Turning off protected mode for Internet & Local Intranet
  • Verified the impersonated user is an administrator account and was able to download a PDF file from a website without difficulty. In addition, the user can access the PDF file from the network folder through Windows Explorer
  • The user has full access to the network folder attempted to access (read, write, etc)

Can anyone offer some advice as to what is causing the problem? Thank you.

1
Have you implemented IAuthenticate service (example)? - noseratio
No, I haven't. I'll try this and get back to you. Thanks. - Paul
I'm trying to implement this, but I can't find a definition for ComExt or IAuthenticate. The MSDN article does not provide information on what it is or how to get intellisense to recognize it. It mentions urlmon.dll, which I'm not able to add to my project as a reference. - Paul
The link points to the full working example, including ComExt definitions. - noseratio
This code seems to require VS 2012. It uses async & await. We only have 2010. I did notice that 2010 is technically able to use those keywords, but from what I've read it's not advised in a production environment? Is there an alternative to this code? - Paul

1 Answers

0
votes

As time went by we decided to just go with Process.Start() since we didn't need a custom form to show our PDFs on.