An ASP.NET Blog
I work for Microsoft and help people and businesses make better use of technolgy to realize their full potential. The opinions mentioned herein are solely mine and do not reflect those of my employer.

You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

Friday, May 13, 2005 7:30 AM

You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied" while trying to debug or browse your ASP.NET Applications.

This may occur if the ASPNET account doesnt have sufficient priveleges on the 'C:\WINDOWS\TEMP' folder, in windows versions prior to Windows Server 2003.

In Windows Server 2003, it is the Network Service account that needs to have the necessary rights for that folder.

Even if you assign rights for EVERYONE it wont work since these accounts do not form a part of the EVERYONE account.

The error can be resolved by explicitly assigning MODIFY rights to ASPNET User account (prior to Windows Server 2003) and NETWORK SERVICE account in case of Windows Server 2003.

That should solve the problem.

Cheers and Happy Programming !!!


Feedback

# re: You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

I am running Windows XP and that did not work. I right-clicked in Properties, Sharing and Security... , and found no way to specify users. What should I do? 10/7/2005 1:06 AM | Dan Parrell

# I still receive this error "BC30138"

I did what you told, but didn't solve my problem, I use windows 2003 server.
I still got this error, and I think this caused by my norton antivirus still tied this directory up, but I don't want to disable this antivirus, cause if I disable it then all the viruses can infect my files.
So, what should I do.
Thank you for your reply. 12/19/2005 1:25 AM | Dedy

# re: You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

Hey man, we got it fixed! I've written up some instructions and took a screen shot that should be helpful. 12/28/2005 1:43 PM | Wizard_Yo

# re: You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

Thanks man!! it really worked ... i have presentation after few mins!!! and suddenly i got this error!
Wicked!
Regards;
Aiman Tamimi 6/18/2006 12:42 PM | Aiman Tamimi

# re: You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

Thanks Guys !!! You saved me , this really works :-)

Regards
Nick 6/23/2006 8:00 PM | Nick

# re: You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

Another satisfied customer. Can you take penalties too? 7/4/2006 12:23 AM | Peter Corr

# re: You may receive the error "BC30138: Unable to create temp file in path 'C:\Windows\TEMP\:' Access is denied"

I have been searching for about 2 hours for a solution to this problem and after reading various solutions (none of which worked) i found a solution.

1. Go to control panel and open system properties
2. Click the advanced tab and then environment variables
3. In the system variables text area scroll find the temp and tmp variables
4. Create a new folder called "temp" anywhere you wish on your hard drive
5. For the temp and tmp variables change the paths to the path of this newly created folder
6. Close visual studio and any other development resources you are running
7. Go to start then run and type iisreset

You should be right and alot happier :) 5/7/2007 2:00 AM | Aaron

Post a comment





 

Please add 1 and 8 and type the answer here: