Permission denied when attempting to write to another web site folder

Posted by: | Uncategorized | 11.09.2007

I just thought Id post this to hopefully assist others with this problem.

I have seen and read numerous posts on IIS permission errors. A number of articles correctly point out that the impersonate user or if not impersonating then the NETWORK_SERVICE account and the ASPNET account, need modify access to the folder you want to write to. But what if you have done that and still no success?

In the application and security event viewer logs I was getting messages that the user did not have the rights to log in as the batch service or to run as a local service. I was also getting errors in my web app that said the user does not have write permission to the hard drive. In desperation I even tried giving all users full permission to the root and everything below it and STILL it said read only.
I was running a .net2.0 application from a virtual directory under a secure root, trying to upload a file using http to a folder in a non secure .net2.0 virtual directory.

What I found was that if the secure site (which did not contain a website) was set up with the ASP.NET version set to 2.0 then every site/virtual directories under this secure site had read-only access to the hard drive. In other words, the secure.markerstudio.com site had to have ASP.NET version set to 1.1.4322, so secure.markerstudio.com/cmanager could upload files into a different folder. All other virtual diretories/sites under this secure site can be whatever ASP.NET version they should be, just the root folder had to be ASP.NET 1.
I am still at a loss as to why asp.net 2.0 should make all access to the hard drive read-only regardless of NTFS permissions – If anyone has anything to add please feel free to comment.

Leave a Reply