Last post Feb 22, 2008 03:34 PM by drew.coppock
Jul 28, 2007 07:02 AM|dubeyparam|LINK
I m creating a Web Site in ASP.NET 2.0. It was working fine till yesterday, but today when I tried to run the project,
I got following error:
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: BC2012: can't open 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\erp\2577ddc1\a4b98fb6\App_Code.wg1ao_ms.dll' for writing."
I tried everything upto my level to solve this problem, but I was unable to solve it.
Can any one please help solve this problem or at least tell me what the cause of the problem is?
Thanx in advance.
Jul 28, 2007 09:44 AM|persa|LINK
Something seems to be locking files in the directory where temporary ASP.NET files are stored.
You could try deleting everything under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\erp directory and test your project again.
Jul 29, 2007 11:17 AM|dubeyparam|LINK
Thanx for ur reply.
I have already tried deleting the "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\erp" directory, but that was of no use. Same project is running very nicely on other systems in my office. Anyways
thanx again for ur reply friend.
Dot Net Technologies
Jul 30, 2007 11:05 PM|Rex Lin - MSFT|LINK
HI, Paramhans Dubey. :
The specified file cannot be opened for writing, perhaps because it has already been opened.
Error ID: BC2012
Close the file and reopen it.
Check the file's permissions.
Jul 31, 2007 05:09 AM|dubeyparam|LINK
Thanx for reply.
I was unable to find the specified file. I think there was a problem in file creation.
Anyways reinstalling the OS has sorted out the problem.
Thanx Again for ur reply.
Jul 31, 2007 12:59 PM|DanaR|LINK
I stumbled across this forum (thanks Google!) because it appears you were helping someone with nearly the identical error I now have. I just created a simple asp.net sample app and am getting the same error, and just like Mr Dubey when I looked in the directory
for the file it did not exist. In fact no files with a .dll exist.
I sure would like to understand what's happening. I am running VS2005 on a Windows2000 machine. Here is the exact error:
Error 1 can't open 'C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\9259aea3\b74b0510\App_Web_6nbn_0op.dll' for writing vbc : Command line
I've tried creating the project again and got the same error. Unfortunately I don't have the luxury of reinstalling the os so I am hoping for another solution.
Jul 31, 2007 01:11 PM|hongping|LINK
Are you getting this error consistently every time you build or browse the page, or does it only happen sometimes or to certain machines?
If you host the web site in IIS, do you get the same error?
Jul 31, 2007 01:21 PM|DanaR|LINK
Before you dig too deep into this I realized that it was my McAfee thinking that something here was doing terrible things. I unblocked a couple "saving to the temp folder" settings and my "Hello World" app is running quite smoothly!
Thanks for at least reading this! And maybe other "googlers" might see this and get an idea that it could be virus software blocking the creation of .dll files.
Aug 01, 2007 04:59 AM|dubeyparam|LINK
I was also using MacAfee when I was getting the error. May be there is a problem with MacAfee, now I am using Symantec Antivirus and all my projects are working fine.
Thanx for ur reply
Aug 01, 2007 11:04 AM|DanaR|LINK
I fairness to McAfee I believe it is trying to do its job which I believe in this case is preventing .dll files from being created remotely (most likely the default setting). Once I understood that to be the case it was simply a matter of telling McAfee
to allow those files to be created by configuring the access protection from the console. In fact I learned just how configurable McAfee can be!
Feb 22, 2008 03:34 PM|drew.coppock|LINK
This worked for me...
Run CMD as administrator (VISTA)
execute vbs command as needed...