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!

29 comments:

Anonymous said...

This solved my problem, thanks!

Brent V said...

Frits,

I 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

Jerome C. said...

Thanks a lot too, this just solved my problem !

Brent V said...

Awesome! Glad to help.

Thank you so much for the feedback!

Brent

Anonymous said...

This worked for me, ty

Brent V said...

Awesome! Thanks for the feedback!

Brent

Anonymous said...

Tusi great ho (you are great! in hindi)

saved my friday.... Thanks Dude

Anonymous said...

Thank you. Helped me...

Brent V said...

So glad it helped! Thanks for the feedback. Always appreciated!

Brent

Anonymous said...

I dont know who you are but your post made my life/job easy.thank you for your help

Brent V said...

Sree,

I am so glad this was helpful to you. Thank you so much for the feedback.

Brent

Anonymous said...

Thanks a lot.........

Brent V said...

Wow! I am just amazed at how many people have this issue. I am so glad this is helping so many.

Brent

Nandita said...

Saved me lot of trouble...thanks.

Brent V said...

Nandita,

That you so much for the feedback. Amazingly this seems to be a common problem. I am so happy you found this useful.

Brent

Anonymous said...

It helped alot, thanks!

Brent V said...

Sweet! I'm so glad it helped. I am so glad I was not the only person in the world having this isue.

Brent

Anonymous said...

Me too.. Thanks for the quick answer ...

Brent V said...

I think this is my most helpful posting every. AWESOME!

Anonymous said...

You are GREAT!!

Brent V said...

Anonymous,

Thank you so much for the praise. Glad to help.

Brent

Anonymous said...

Thanks for a nice tip. It worked for me also.

Brent V said...

Anonymous,

Thank you for the confirmation. Rock solid!

Thanks,

Brent

Anonymous said...

I had the samae prblem with VS2008 and this solved it. Thanks.
Vlado

Brent V said...

Anonymous,

So glad to help. Thanks for the feedback.

Brent

Vankayala said...

Thanks, it helped.

Brent V said...

Vankayala,

Awesome! Glad it helped!

Thx for the feedback!

Brent

Bob said...

Here is an alternate solution: Comment out the entry in web.config, publish the web site, then uncomment it in the published location.

Anonymous said...

I had the same Problem with VS2010.

But I don't understand why - but it works.

Thank you verry much.