20Sep/100

Visual Studio Unable to add to the Web site Unable to add file Access is denied

I am trying to publish my project from my development machine to the staging environment. I would right click the project in visual studio and click publish. Most of the files would publish just fine, but a few were giving me problems. In the output log, there were multiple error messages, all stating:

Unable to add ‘XXX.ext’ to the Web site. Unable to add file ‘XXX.ext’. Access is denied.

Each XXX.ext would be a different file. What I learned after browsing and searching Google is to make sure the files on the production (or target) server are not marked as Read Only. The solution was to:

1. Go to the Publish directory
2. Highlight all files and folders
3. Right click and select Properties
4. Make sure the Read-only attribute checkbox is unchecked (white and not gray or checked). To be sure I checked the read only attribute, applied it, then unchecked it.

That was it. On the next publish, there were no errors.

References:
http://www.victorchen.info/unable-to-add-to-the-web-site-unable-to-add-file-access-is-denied/


Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.

Close
E-mail It