andrewdavey / cassette

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

Cassette 2.4.0 - Unable to determine granted permission for assembly. #439

Closed nvivo closed 10 years ago

nvivo commented 10 years ago

An existing application stopped working after upgrading to 2.4.0.

This comment on an old related issue may give some detailst: https://github.com/andrewdavey/cassette/issues/154#issuecomment-32953889 ?

Here is the stack trace, using VS 2013 + IIS Express:

Unable to determine granted permission for assembly.

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.IO.IsolatedStorage.IsolatedStorageException: Unable to determine granted permission for assembly.

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: 

[IsolatedStorageException: Unable to determine granted permission for assembly.]
   System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) +4815488
   System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) +77
   System.Lazy`1.CreateValue() +14308960
   System.Lazy`1.LazyInitValue() +524
   Cassette.Aspnet.IsolatedStorageContainer.get_IsolatedStorageFile() +88
   Cassette.IO.IsolatedStorageFile.get_Exists() +19
   Cassette.Aspnet.WebHostSettingsConfiguration.IsStaticCacheManifest(CassetteSettings settings) +80
   Cassette.Aspnet.WebHostSettingsConfiguration.Configure(CassetteSettings settings) +249
   Cassette.ConfigurationEnumerableExtensions.Configure(IEnumerable`1 configurations, T configurable) +176

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +694
   Cassette.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) +873

[TinyIoCResolutionException: Unable to resolve type: Cassette.CassetteSettings]
   Cassette.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) +1241
   Cassette.TinyIoC.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) +165
   Cassette.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) +1296
   Cassette.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) +729

[TinyIoCResolutionException: Unable to resolve type: Cassette.BundleCollection]
   Cassette.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) +1049
   Cassette.TinyIoC.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) +165
   Cassette.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) +1296
   Cassette.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) +729

[TinyIoCResolutionException: Unable to resolve type: Cassette.Views.BundlesHelper]
   Cassette.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options) +1049
   Cassette.TinyIoC.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) +165
   Cassette.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options) +1296
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +248
   System.Linq.<CastIterator>d__b1`1.MoveNext() +296
   Cassette.HostBase.RunStartUpTasks() +248
   Cassette.HostBase.Initialize() +374
   Cassette.Aspnet.CassetteHttpModule.InitWithTraceLogging() +167
   Cassette.Aspnet.CassetteHttpModule.Init(HttpApplication httpApplication) +188
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +530
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Unable to resolve type: Cassette.Views.BundlesHelper]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12599232
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12438981
TheCloudlessSky commented 10 years ago

:+1:

robpvn commented 10 years ago

Technically this issue is a duplicate of issue #421 and should be referred into that, even though it looks like the discussion is ongoing in issue #154 .

c0state commented 10 years ago

I also got this error but seemingly due to a different reason from most of the issues I've seen posted here.

Specifically, I got this error when my app pool was running in 64-bit mode vs when the enable 32-bit flag was set on the app pool. This is IIS 7.5 and a .Net 4.5.1 application. Not sure why this happened though...

paulostradioti commented 9 years ago

I also got this issue. I`ve set the Application Pool's "Enable 32-Bit Applications" property to True and then It worked fine.

sigeje commented 8 years ago

Hi @paulostradioti , your solution worked for me too. Thanks!