Last post Mar 04, 2009 05:52 PM by aneesh.aravind
Apr 05, 2006 07:04 AM|bala_excel|LINK
I migrated my webapplication from VS 2003 to VS 2005. and i am running on win xp Professional sp2. After migrating. i am getting the following error .
"The type initializer for 'System.Web.Compilation.CompilationLock' threw an exception." the error is shown in the following line
i looked into the net but couldnt fix this.
any help would be highly appreciated
Thanks in advance,
Apr 06, 2006 02:25 PM|davidebb|LINK
Apr 07, 2006 01:04 AM|bala_excel|LINK
Thanks for your reply,
I have restarted both my VS and IIS but it didnt turn fruitful. and the application is running under IIS.
I am getting this error while building the application.
I have admin rights.
I am not getting any build error when I create a new website in VS 2005
kindly let me know what I am doing wrong !
Thanks in advance
Apr 10, 2006 03:17 PM|davidebb|LINK
To be sure, is this an error that you see in the error list in VisualStudio, or at runtime in the browser?
This error could happen if a process is already holding on to the Mutex object that ASP.NET tries to use for this application (it's used to protect compilations). But I really can't explain how restarting all processes doesn't fix it. Even rebooting doesn't
I would use
procexp to investigate this, but this is a little adanced. Look for a Mutex (aka Mutant) with a name that starts with "CL", and check what process might be holding on to it.
Apr 24, 2006 08:57 AM|gleizerowicz|LINK
Apr 24, 2006 01:45 PM|davidebb|LINK
Apr 24, 2006 02:29 PM|gleizerowicz|LINK
I can reproduce it easily:
1. Open VS
2. Build one of my two websites in this solution
3. Browse to the application in IE, get runtime compilation lock error
Then, after closing the mutex handle held by devenv.exe:
1. Refresh browser, use app
2. Build website in VS, get mutex or compilation lock error
From here I close the mutex handle held by aspnet_wp.exe
This behavior is consistent. Would you like to see my solution file offline? I'd be happy to give you whatever info would be helpful.
Apr 24, 2006 02:43 PM|davidebb|LINK
Yes, please send me email offline and I will include a few people who will help out with the investigation.
Jul 15, 2006 10:35 AM|dstgroup|LINK
Jul 17, 2006 08:28 AM|gleizerowicz|LINK
Sorry Geoff - no resolution yet. My workaround was to remove the web project from my solution, then recreate it as a file system web project instead of a local IIS project. To debug, I browse to my local site and attach to the process.
I have some steps that MS Developer Support suggested; they didn't work for me, but if you contact me offline I'll be happy to send them to you and you can try them yourself.
Jul 17, 2006 04:46 PM|ChadLindstrom|LINK
Feb 08, 2009 02:41 AM|SyntaxC4|LINK
Take a look at this forum:
Seems he found an issue with his web.config file after the file conversion.
Hope this helps.
Mar 04, 2009 05:52 PM|aneesh.aravind|LINK
I had the same error message and here's what I found out. If I have a project open in VS 2005, and am debugging, my ASP.NET Development Server (the little icon in the tray on the RHS) latches on to the files and creates a lock on the files.
Here's how to reproduce the scenario:
To get around this error, look in your icon tray at the bottom right hand corner and find the icon for ASP.NET Developement Server and stop it. You should be able to compile the Project now without any error.