Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 16, 2012 03:55 AM by Angie xu - MSFT
Nov 15, 2012 02:41 AM|LINK
I am building an MVC3 application in VS2010. When I build it, it throws an error saying
"The type initializer for 'System.Web.Compilation.CompilationLock' threw an exception"
I am running VS in elevated privileges.
The code is placed in IIS.
I have tried iisreset, aspnet_reg but to no avail. I am unable to find what is causing this error.
Help is appreciated
Nov 16, 2012 01:28 AM|LINK
Finally, I found the solution myself.
The problem was in the name of the website.. since it was an IIS website hence the name of the website was
I suspect the "://" in the name was the problem and since its not a valid name for creating a folder or file in Temporary Files in IIS, the compilation lock was throwing error.
I removed it as IIS website and changed it to File System website. Since now the name doesnt have any "://" it builds and runs as expected.
Any views or queries are welcome
Cheers... Ashish :)
Nov 16, 2012 03:55 AM|LINK
Glad that you've solved your problem by yourself and I come here to confirm and close the issue.
If you have anything urgent, please feedback by creating another issue.