Compiler Error Message: BC31019: Unable to write to output file 'C:\WINNT\...

Hello Experts,

Scenario:  

I have an ASP.NET 2.0 website running on a Windows 2000 server with IIS 6.0.  I am receiving the error message below on some of my pages, but not others.  I can also access certain pages on my Dev site, that recieve the compile error on the Prod site, and vice versa.  After reading multiple posts on different websites, we tried to give the correct permissions to individual folders that were trying to be wrote to, but to no avail.  We then gave our Network Service account full permissions on C:\WINNT\Microsoft.NET, and that also has not worked.  We have restarted IIS a couple of times and or server once.  We are at a loss and can not imagine what is wrong.  This really came out of the blue and cannot imagine what caused it.  Thank you in advance for any help you can give.

Error:
************************************************************************
Server Error in '/' Application.
--------------------------------------------------------------------------------

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: BC31019: Unable to write to output file 'C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\App_Web_inttest.aspx.cdcab7d2.kwvpjjys.dll': Access is denied.

Source Error:



[No relevant source lines]
 

Source File: vbc :    Line: 0



Show Detailed Compiler Output:


c:\winnt\system32\inetsrv> "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINNT\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINNT\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINNT\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINNT\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\App_Web_inttest.aspx.cdcab7d2.kwvpjjys.dll" /D:DEBUG=1 /debug+ /win32resource:"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\lzfo0kzq.res" /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls  "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\App_Web_inttest.aspx.cdcab7d2.kwvpjjys.0.vb" "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\App_Web_inttest.aspx.cdcab7d2.kwvpjjys.1.vb" "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\App_Web_inttest.aspx.cdcab7d2.kwvpjjys.2.vb"


Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

vbc : error BC31019: Unable to write to output file 'C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0bb1d02d\c3f6bef5\App_Web_inttest.aspx.cdcab7d2.kwvpjjys.dll': Access is denied.


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
************************************************************************

DQBA3vpzAsked:
Who is Participating?
 
strickddConnect With a Mentor Commented:
You can either pre-compile your site or grant permissions to read and write to the folder : "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files". You can do this by a group or individual user.
0
 
AmNoGeekConnect With a Mentor Commented:
What you need to do is right click on C:\WINNT\Microsoft.NET\Framework folder. Select Sharing and Security. Now select the Security Tab. Here check if the ASPNET user has read write permissions on this folder. If not then you will need to add the user by clicking on Add. In this 'Select Users, Computers or Groups' window make sure that the location is your computer not any of the sub domains. Write ASPNET in the text area and click on Check Names. It will show you the ASPNET account on the computer, click on ok.
This way your worker process will have permissions to write to this folder.
Let us know if that worked for you.
0
 
DQBA3vpzAuthor Commented:
We already granted the Network Service and ASPNET USER full control rights over C:\WINNT\Microsoft.NET and all child folders to no avail.  Unless you specifically need to call out ASPNET USER on that folder, that option did not work for us.

I am trying the precompilation suggestion now.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
DreamMasterConnect With a Mentor Commented:
Indexing services need to be set off for the temporary ASP.NET folder to get rid of it. Take a look at this knowledge base article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;329065

Regards,
Max.
0
 
DQBA3vpzAuthor Commented:
Thanks for all of your time in helping us determine what could be causing our problem.  We have tried all the above suggestions, but have not been able to fix the problem.  We are going to uninstall and reinstall the entire .NET frame work on our server.  Hopefully that will solve problem and we will let you know if it doesn't.

Thanks again.
0
 
DreamMasterCommented:
I hope that will help for you :)

Regards,
Max.
0
 
DQBA3vpzAuthor Commented:
We ended up creating a creating a simple new website with a new IIS publication.  We then gave the NETWORK SERVICES account write access to the C:\WINNT\Temp folder on the server.  This allowed the simple site to start running.  We then imported a newly compiled version of our site in its place and we are back up and running.

Thanks for everyones help.
0
 
DreamMasterCommented:
Glad to have been helpful :)

Regards,
Max.
0
All Courses

From novice to tech pro — start learning today.