This project is read-only.

VS2010 Deploying to server 2008 r2 access denied on web.config

Jan 23, 2012 at 1:23 AM

Hi All: I'm trying to take a local copy of BE 2.5 and Web Deploy to a remote 2008 R2 server. The website was set up on the server in IISManager and configured for web deploy publishing.

Everything works during deployment in terms of uploading all the files, but once BE is deployed to the webserver I get "access denied" on web.config.

I edited the website's root folder's permissions by explicitly giving Network Service read permissions, and this seemed to work temporarily, but on the next deploy, access was broken again.

I'm not sure if this is a web-deploy issue (e.g. replacing permissions on the files) or a config issue on the server?  

Jan 23, 2012 at 10:48 AM

Are you able to verify if the Network Service account has read permissions on the root folder right after you give permissions?  And what about later on when the error occurs.  I'm wondering if you see Read permissions at first, and then the next day if they are no longer there.  It does seem odd that Read permissions would just disappear.

Jan 23, 2012 at 4:39 PM

Ben, thanks for taking the time to reply. I haven't been able to consistently reproduce the problem yet. What would happen is the "access denied" error would appear after publishing, and manually opening and re-saving the web.config in website folder (from a terminal session) would fix the problem.

I was testing with a default configuration of 2.5, and didn't realize (at first) that each time I published, I was overwriting the XML files in App_Data. I moved all the data to SQL Server and didn't have the "access denied" issue, but I don't think those two issues are related. However, I am applying transforms to the web.config now (for the SQL connection), so maybe it is related...I will test some more and follow up.