Exception: Unable to create mutex. (Exception from HRESULT: 0x80131464)

3,310 views
Skip to first unread message

Daniel Moskowitz

unread,
Jan 27, 2014, 12:48:16 PM1/27/14
to cass...@googlegroups.com
There's an error that we've encountered on our staging servers, that we did not encounter on our development machines. Here's the error and stacktrace:

[IsolatedStorageException: Unable to create mutex. (Exception from HRESULT: 0x80131464)]
   System.IO.IsolatedStorage.IsolatedStorageFile.Open(String infoFile, String syncName) +0
   System.IO.IsolatedStorage.IsolatedStorageFile.Lock(Boolean& locked) +142
   System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf) +301
   System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf) +24
   System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile(String path, FileMode mode, FileAccess access, FileShare share) +40
   Cassette.IO.IsolatedStorageFile.Open(FileMode mode, FileAccess access, FileShare fileShare) +34
   Cassette.Caching.BundleCollectionCacheWriter.OpenManifestFileForWriting() +43
   Cassette.Caching.BundleCollectionCacheWriter.WriteManifestFile(Manifest manifest) +329
   Cassette.Caching.BundleCollectionCache.Write(Manifest manifest) +56
   Cassette.CacheAwareBundleCollectionInitializer.WriteToCache() +128
   Cassette.CacheAwareBundleCollectionInitializer.Initialize(BundleCollection bundleCollection) +257
   Cassette.RuntimeBundleCollectionInitializer.Initialize(BundleCollection bundles) +35
   Cassette.ExceptionCatchingBundleCollectionInitializer.Initialize(BundleCollection bundleCollection) +34

[Exception: Bundle collection rebuild failed. See inner exception for details.]
   Cassette.BundleCollection.GetReadLock() +178
   Cassette.Views.BundlesHelper.Url(String bundlePath) +46
   Cassette.Views.Bundles.Url(String bundlePath) +41
   <local project code redacted>
   System.Web.UI.Control.InitRecursive(Control namingContainer) +134
   System.Web.UI.Control.InitRecursive(Control namingContainer) +290
   System.Web.UI.Control.InitRecursive(Control namingContainer) +290
   System.Web.UI.Control.InitRecursive(Control namingContainer) +290
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489


Can anyone provide insight into what would cause this error? How to debug it? This is happening to multiple sites that we have hosted on our servers, but not all. Not sure what the common thread is between the sites that are (not) throwing it.

I found this post talking about this exception (not in relation to Cassette, though) but it doesn't seem to do the trick: http://blogs.msdn.com/b/jorman/archive/2006/07/24/system-invalidoperationexception-mutex-could-not-be-created.aspx

Any input appreciated! Thanks.

Daniel Moskowitz

unread,
Jan 27, 2014, 1:10:07 PM1/27/14
to cass...@googlegroups.com
Funny how writing a post about your problem is always the thing you need to find the solution.

Looks like this is an issue with ASP.Net and isolated storage. Not working for us. Not familiar with Isolated Storage, so I'm not sure if that's expected.

Anyway, specifying a cacheDirectory in the Cassette configurations solved the problem. Our sites' web.configs now look like this:

<cassette rewriteHtml="false" cacheDirectory="/cassettecache/" />

Andrew Davey

unread,
Jan 27, 2014, 1:12:06 PM1/27/14
to Cassette
There has been a regression in Cassette's isolated storage code in v2.4.

Using cacheDirectory in web.config is a good work around for now :)


--
You received this message because you are subscribed to the Google Groups "Cassette" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cassette+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Daniel Moskowitz

unread,
Jan 28, 2014, 4:45:57 PM1/28/14
to cass...@googlegroups.com
Thanks for the info.

Related question: should I expect to see any files created/stored in the directory I specify as the cache directory? I believe Cassette is supposed to create the directory if it doesn't exist... but I don't see that happening. And if I create the directory manually, I still never see any files there. The account that's running the web process has access to write to that folder. Is this anything to be concerned about? Cassette appears to be working as I expect, and I don't receive any errors. 

Thanks.

Andrew Davey

unread,
Jan 29, 2014, 5:56:38 AM1/29/14
to Cassette
I think you want this instead:

<cassette cacheDirectory="cassettecache/" />

Note the lack of a starting "/" in the path. This makes it relative to the web application root, instead of c:\

Daniel Moskowitz

unread,
Jan 29, 2014, 6:26:57 PM1/29/14
to cass...@googlegroups.com
Hm... just tried that, still not seeing that folder created, or any files inside it if I create it myself.
Reply all
Reply to author
Forward
0 new messages