tags:

views:

49

answers:

1

Hi,

I'm wondering what the best way is to use the XDocument.load and save methods on files located on a password protected netshare. I'm building an asp.net mvc application.

+1  A: 
  1. You need to provide the correct permissions to the process that is running your asp.net code eg your app pool.

  2. You can use impersonation in an Extranet environment so that the thread runs as the user connecting to the asp.net page.

  3. You can temporarily elevate permissions on the thread that opens the file.

James Westgate
Correcting permissions helped for me, is this the most "clean" solution though?
Tomh
As long as you havent elevated the permissions of the account more than absoltely necessary.Im a fan of option 3 but it is also the most work.
James Westgate