Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Mutex could not be created

There are some conditions where you may got the error given below while running the website in asp.net 2.0. When i got this error i researched a lot then i found this solution.

Error is given below

Description: An unhandled exception occurred during the execution of the 
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Mutexcouldnot be created.
Source Error: An unhandled exception was generated during the execution
of the current web request. Information regarding the origin and location
of the exception can be identified using the exception stack trace below.
Stack Trace: [InvalidOperationException: Mutexcouldnot be created.]
System.Web.Compilation.CompilationMutex..ctor(String name, String comment)
+3464673 System.Web.Compilation.CompilationLock..cctor() +158
[TypeInitializationException: The type initializer for
'System.Web.Compilation.CompilationLock' threw an exception.]
System.Web.Compilation.CompilationLock.GetLock(Boolean& gotLock) +32
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +114
[HttpException (0x80004005): The type initializer for
'System.Web.Compilation.CompilationLock' threw an exception.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3426855
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +
88 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+149 ------------------------------------------------------------------
-------------- Version Information: Microsoft .NET Framework Version:
2.0.50727.42; ASP.NET Version:2.0.50727.42

I am writing the steps for removing this error and successfully running the website.

- If you have visual studio 2005 is open, close it
- Go tot the ASP.NET temporary folder for v2.0 of the framework
\Microsoft.Net\Framework\v2.0\Temporary ASpNET pages
- Remove the folder for your application (or all of them)
- Reset IIS (on a command line window, >iisreset) [not always needed,
but I had to use it sometimes]
- First Browse your page from IE (http://localhost/your app)
- Then reopen Visual studio

And it should work now

Link where i found the solution is given below:

Helpful Website Url
http://forums.asp.net/t/936236.aspx
Share this article   |    Print    |    Article read by 1848 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles:
Related Interview Questions: