Friday, July 18, 2008
Can't publish Visual Studio 2005 Web Site because access denied error
If you get an error like "Access to the path 'C:\Documents and Settings\username\Local Settings\Temp\~6d4\bin\App_WebReferences.compiled' is denied." when you use the VS2005 | Build menu | Publish Web Site and your site impersonates a user this may help.
Open up Windows Explorer and navigate to the Temp directory specified in the path. In this example, go to "C:\Documents and Settings\usb00528\Local Settings\Temp". Now right-click on the Temp directory and go to the security tab. Add the user that you are impersonating (usually specified in you web.config) and give the user Read and Write permissions. Now re-try the Publish Web Site menu item and it should publish successfully now. Yeah!
This solved my problem, thanks!
ReplyDeleteFrits,
ReplyDeleteI am so glad this helped you. I know it frustrated me for a while. Glad to help. Thank you for the feedback. I love knowing I make a difference.
Brent
Thanks a lot too, this just solved my problem !
ReplyDeleteAwesome! Glad to help.
ReplyDeleteThank you so much for the feedback!
Brent
This worked for me, ty
ReplyDeleteAwesome! Thanks for the feedback!
ReplyDeleteBrent
Tusi great ho (you are great! in hindi)
ReplyDeletesaved my friday.... Thanks Dude
Thank you. Helped me...
ReplyDeleteSo glad it helped! Thanks for the feedback. Always appreciated!
ReplyDeleteBrent
I dont know who you are but your post made my life/job easy.thank you for your help
ReplyDeleteSree,
ReplyDeleteI am so glad this was helpful to you. Thank you so much for the feedback.
Brent
Thanks a lot.........
ReplyDeleteWow! I am just amazed at how many people have this issue. I am so glad this is helping so many.
ReplyDeleteBrent
Saved me lot of trouble...thanks.
ReplyDeleteNandita,
ReplyDeleteThat you so much for the feedback. Amazingly this seems to be a common problem. I am so happy you found this useful.
Brent
It helped alot, thanks!
ReplyDeleteSweet! I'm so glad it helped. I am so glad I was not the only person in the world having this isue.
ReplyDeleteBrent
Me too.. Thanks for the quick answer ...
ReplyDeleteI think this is my most helpful posting every. AWESOME!
ReplyDeleteYou are GREAT!!
ReplyDeleteAnonymous,
ReplyDeleteThank you so much for the praise. Glad to help.
Brent
Thanks for a nice tip. It worked for me also.
ReplyDeleteAnonymous,
ReplyDeleteThank you for the confirmation. Rock solid!
Thanks,
Brent
I had the samae prblem with VS2008 and this solved it. Thanks.
ReplyDeleteVlado
Anonymous,
ReplyDeleteSo glad to help. Thanks for the feedback.
Brent
Thanks, it helped.
ReplyDeleteVankayala,
ReplyDeleteAwesome! Glad it helped!
Thx for the feedback!
Brent
Here is an alternate solution: Comment out the entry in web.config, publish the web site, then uncomment it in the published location.
ReplyDeleteI had the same Problem with VS2010.
ReplyDeleteBut I don't understand why - but it works.
Thank you verry much.