cassette icon indicating copy to clipboard operation
cassette copied to clipboard

Azure + Release = 500 on cassette.axd

Open mikethedarv opened this issue 10 years ago • 10 comments

Everything works great locally and remotely when debug = "true". However, once published in release mode (and settings debug to false), all calls to the cassette.axd file throws a 500 with the following error message:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'script/js/dashboard/b955baf4713c9f6f2c09183f1d4217c560be3960.js'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf) at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf) at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile(String path, FileMode mode, FileAccess access, FileShare share) at Cassette.IO.IsolatedStorageFile.Open(FileMode mode, FileAccess access, FileShare fileShare) at Cassette.IO.FileExtensions.OpenRead(IFile file) at Cassette.CachedBundleContent.OpenStream() at Cassette.Bundle.OpenStream() at Cassette.Aspnet.BundleRequestHandler1.SendBundle(Bundle bundle, String actualETag) at Cassette.Aspnet.BundleRequestHandler1.ProcessRequest(String path) at Cassette.Aspnet.CassetteHttpHandler.CallBundleHandler(String pathInfo) at Cassette.Aspnet.CassetteHttpHandler.CallPathInfoHandler(String pathInfo) at Cassette.Aspnet.CassetteHttpHandler.ProcessRequest() at Cassette.Aspnet.CassetteHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Raw url: /cassette.axd/script/b955baf4713c9f6f2c09183f1d4217c560be3960/js/dashboard

(The path differs per bundle but same error message).

Any ideas what is causing this error?

Thanks

Mike

mikethedarv avatar Dec 21 '14 09:12 mikethedarv

Did you find a way to fix this Mike?

michaeldimoudis avatar Feb 09 '15 05:02 michaeldimoudis

I can't remember how I fixed it but it's working now. Which version/nuget packages are you referencing?

mikethedarv avatar Feb 11 '15 05:02 mikethedarv

We had version 2.2.2 I just updated it to 2.4.2, I'll see how that goes.

michaeldimoudis avatar Feb 11 '15 07:02 michaeldimoudis

I just checked and that's the version we're using, so I believe upgrading fixed it.

mikethedarv avatar Feb 11 '15 07:02 mikethedarv

Hi all. Still getting this on 2.4.2.14968. Any suggestions appreciated.

damiensawyer avatar Jul 12 '15 19:07 damiensawyer

We are still getting this but very infrequently on AWS in latest 2.4.2 version. @damiensawyer did you manage to find a workaround?

michaeldimoudis avatar Feb 24 '16 05:02 michaeldimoudis

Sorry @michaeldimoudis, I didn't find a solution. From memory, I didn't need the newer features of Cassette, so just rolled back to an older version. I can find out which one if you need me to. That older version has been stable in production for a few years.

damiensawyer avatar Feb 24 '16 08:02 damiensawyer

@damiensawyer that would be great!! Thanks for that, we don't use newer features too, so if an older version is stable that's all we need.

michaeldimoudis avatar Feb 24 '16 08:02 michaeldimoudis

@michaeldimoudis, it looks like it's Cassette 2.0.0 Cassette.Aspnet 2.0.0 Cassette.Views 2.0.0

I'm 95% sure that's correct. I'm not on my development machine and am just looking at source. The nuget setup in the project in question is a bit of a mess, hence the 'best guess'.

damiensawyer avatar Feb 24 '16 10:02 damiensawyer

I am using 2.4.2 on Azure without issues. I don't think I'm doing anything special--are you using continuous deploy or web publish? When I have had an issue or two, deleting the cassette directory under App_Data in the Kudu console usually resolves it.

I am using:

<cassette cacheDirectory="App_Data/cassette" />

kamranayub avatar Mar 05 '16 16:03 kamranayub