views:

25

answers:

2

I'm trying to publish my website to a local folder. I have two websites in my solution, one of them publishes with no problems, but the other fails and generates this in the output window:

------ Build started: Project: SSODAL, Configuration: Debug Any CPU ------
SSODAL -> D:\SourceCode\Infrastructure\Single Sign On\1.1\Source\SSODAL\bin\Debug\SSODAL.dll
------ Build started: Project: http://localhost:8000/, Configuration: Debug .NET ------
Pre-compiling Web Site
: Publication (web): Access to the path 'C:\Users\bgolden\AppData\Local\Temp\~58f9\' is denied.

Pre-compilation Complete
------ Skipped Publish: Project http://localhost:8000/, Configuration: Debug .NET ------

========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========
========== Publish: 0 succeeded, 0 failed, 1 skipped ==========

I'm using Visual Studio 2008. There are few examples of this error on the internet, the closest match suggests it's something to do with impersonation, but I'm not using impersonation here. Also, I'm running Visual Studio as Administrator.

Has anyone come across this before?

Thanks, Ben

+2  A: 

I just ran across this myself today and it caught me by surprise as I had been able to publish the website just a couple days ago. But, it is the case for me that another team member added impersonation to the web.config file so my issues was related to impersonation (as googling implied).

To work around it, I added permissions for the impersonating user to my directory:

C:\Documents and Settings\[username]\Local Settings\Temp

...and the problem went away. I will say this goes against logic that you would need to do this, but as other searches suggest, it is necessary.

Hope that helps!

Christopher Hujanen
Thanks for the info. I fixed my problem by changing the temp folder to a different directory.
BG100
A: 

I fixed this problem myself (or rather worked around it) by moving my temp folder to a different path out side of the user area (such as C:\TMP).

I did this by changing the two user environment variables TMP and TEMP:

  • right click computer icon
  • click Properties
  • Advandced System Settings
  • Environment Variables. (on windows 7)
BG100