Computer Services
  • Local Businesses Offer
  • Trusted Partners
  • Services & Solutions
  • Local Businesses Offer
  • Trusted Partners
  • Services & Solutions

CS0016: Could not write to output file, ASP.NET, The Directory Name is Invalid

Compiler Error Message: CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e87cb72e\a4979ba0\ App_Web_waitingforapproval.aspx.924c370c.moquvjr8.dll' -- 'The directory name is invalid. ' Source Error: [No relevant source lines]


Source File: Line: 0 Show Detailed Compiler Output:

" c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe"
.
.
.

Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1 Copyright (C) Microsoft Corporation. All rights reserved.

error CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e87cb72e\a4979ba0\App_Web_xxx.aspx.924c370c.moquvjr8.dll' -- 'The directory name is invalid. ' "
 

This can occur if you do not have the proper permissions set for the "Temporary ASP.NET Files". Try adding NETWORK SERVICE and IIS_WPG with Modify or Full Control.

Also, make sure that C:\Windows\Temp is still there as well and apply the same permissions.

Perform and IIS Reset and the error should be corrected.
 

Posted: 12/17/2012 5:00:00 PM by Proxy Consulting | with 2 comments
Filed under: ASP.NET, Microsoft Windows
Trackback URL: http://www.proxycg.com/trackback/2031a13f-b4aa-47b5-81f1-5f8952f9be7b/CS0016-Could-not-write-to-output-file,-ASP-NET,-The-Directory-Name-is-Invalid.aspx?culture=en-US

Comments
Thawte
Great site. I add this Post to my bookmarks.
2/7/2013 1:55:06 PM

Bob Q.
Another thing I like to do is delete the temporary cache as a good practice. A lot of stuff accumulates over time under Microsoft.net\Framework temp files. Cleaning this out from time to time is a good idea, especially if there are a lot of code updates.
12/29/2012 4:14:53 PM

Blogging Technology

Kentico CMS, WordPress, C#, ASP.NET, Windows Server, Windows, SQL Server, Computer Security and other technology related articles.

Resources

A blog about technology in general and how-to articles.

Syndication