andrewdavey / cassette

Manages .NET web application assets (scripts, css and templates)
http://getcassette.net
MIT License
534 stars 143 forks source link

Azure + Release = 500 on cassette.axd #465

Open mikethedarv opened 9 years ago

mikethedarv commented 9 years ago

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

michaeldimoudis commented 9 years ago

Did you find a way to fix this Mike?

mikethedarv commented 9 years ago

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

michaeldimoudis commented 9 years ago

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

mikethedarv commented 9 years ago

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

damiensawyer commented 9 years ago

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

michaeldimoudis commented 8 years ago

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

damiensawyer commented 8 years ago

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.

michaeldimoudis commented 8 years ago

@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.

damiensawyer commented 8 years ago

@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'.

kamranayub commented 8 years ago

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" />