Visual Studio: Unable to add to the Web site... Unable to add file... Access is denied Error 550

Razor picture Razor · Mar 28, 2012 · Viewed 25.3k times · Source

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 (550)

I'm following this : But I don't find the "Read-only" attribute checkbox...

So have you any ideas ? Thanks in advance.

Answer

Levi Botelho picture Levi Botelho · Jan 18, 2013

I just solved this problem on my own system. It was a permissions issue. What I had to do was grant "write" rights to myself on the IIS directory (in my case wwwroot). I retried the publish from Visual Studio and it worked perfectly.