Technology Blogs > Bits and Bytes > November 2010 > CS0016: Could not write to output file, ASP.NET, The Directory Name is Invalid

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

If you receive the following error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

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: 11/11/2010 7:45:00 PM by Global Administrator | with 0 comments
Filed under: File Permissions, Windows File Permissions, ASP.NET


Trackback URL: http://www.proxycg.com/trackback/29d0eabf-f679-4afb-adae-7ff7fd02e9c7/CS0016--Could-not-write-to-output-file,-ASP-NET,-The-Directory-Name-is-Invalid.aspx

Comments
Blog post currently doesn't have any comments.
Leave comment Subscribe



Enter security code:
 Security code