Microsoft's explanation of this error:
Http://support.microsoft.com/default.aspx? SCID = KB; en-US; 825791 symptoms
When you view a Microsoft ASP. NET application in a Web browser, you may receive the following error messages:
For the Microsoft. NET Framework Version 1.1, the error message is the following:
Cs0016: cocould not write to output file 'C: \ windows \ Microsoft. net \ framework \ v1.1.4322 \ temporary ASP. net files \ application1 \ c11b43f6 \ cf3ec03 \ rizcntet. dll '. the directory name is invalid.
For the. NET Framework 1.0, the error message is the following:
Cs0013: Unexpected error writing metadata to file 'C: \ windows \ Microsoft. net \ framework \ v1.0.3705 \ temporary ASP. net files \ application2 \ 3fc72f26 \ eb731247 \ ev2bslce. dll '. the directory name is invalid.
Cause
The SystemTempAndTMPVariables point to a folder that does not exist. The Compiler generates temporary files in the folder whereTempAndTMPVariables point to before the files are copied to the temporary ASP. net Files folder. however, the folder where the system variables point to is deleted when you restart the computer. therefore, the compiler cannot generate the temporary files.
Resolution
1. |
Create a Temporary Folder under% SystemRoot %, And then name itTemp. |
2. |
Grant full permissions on the temp folder toASPnetUser Account in. NET Framework 1.0 or toNETWORK SERVICEUser Account in. NET Framework 1.1. |
3. |
Right-clickMy computer, And then clickProperties. |
4. |
OnAdvancedTab, clickEnvironment Variables. |
5. |
SelectTempVariable underSystem Variables, And then clickEdit. |
6. |
Type% SystemRoot %\ TempInVariable valueBox, and then clickOK. |
7. |
Repeat steps 5 and 6 to editTMPVariable. ClickOKTwo times. |
8. |
ClickStart, And then clickRun. |
9. |
To Reset Internet Information Services (IIS), TypeIisresetOn the command prompt. NoteIf the error message that is mentioned in the "symptoms" section of this article persists, restart the computer. |
More information
Steps to reproduce the behavior
1. |
Start Microsoft Visual Studio. NET. |
2. |
Create a new ASP. NET web application project by using Microsoft Visual C #. Net or Microsoft Visual Basic. net, and then name the projectCompiletest. |
3. |
OnBuildMenu, clickBuild Solution. |
4. |
Right-clickMy computer, And then clickProperties. |
5. |
OnAdvancedTab, clickEnvironment Variables. |
6. |
SelectTempVariable underSystem Variables, And then clickEdit. |
7. |
Type% SystemRoot %\ Temp1InVariable valueBox to point to the nonexistent temp1 folder, and then clickOK. |
8. |
Repeat steps 6 and 7 to editTMPVariable to point to the nonexistent temp1 folder. |
9. |
ClickOKTwo times. |
10. |
To notice one of the error messages that are mentioned in the "symptoms" section of this article, visit the following URL:Http: // localhost/compiletest/webform1.aspx |
References
For more information about how to grant permissions to a folder, visit the following Microsoft Developer Network (msdn) web site:
Securing your ASP. NET application and Web Services
Http://msdn2.microsoft.com/en-us/library/aa302435.aspx Http://msdn2.microsoft.com/en-us/library/aa302435.aspx)