views:

28

answers:

1

I have an internal ASP.NET MVC 2.0 web application that employees can upload documents to. I am then copying these files to another server for processing. Currently the web application (IIS 7 .NET 4.0) is running under an application account we set up (i.e. WebApp => Basic Settings => Connect as..). This application account has read/write ability on this other server (both share and file security. It was also set as a local admin at one point), but when I try to copy a file to the other server (I can copy/create files on the local server just fine) I get:

System.UnauthorizedAccessException: Access to the path '\\NotTheWebServer\BlahBlah\Blah.pdf' is denied.

If I give "Everyone" share rights to this folder it works. I don't want give everyone write access via the file system.

My Question: Is this just poor practice to do what I am trying doing here? If so what is the best way to accomplish this goal?

Thanks, Mike

A: 

This was stupidity/ignorance on my part. I needed to change the user rights on the application pool associated with with this web application not the rights on the virtual directory. Once the user right where changed on the app pool everything worked as excepted.

Mosquito Mike