Could not load file or assembly 'Autofac.Configuration

Topics: General
Apr 3, 2012 at 8:30 PM

Hey. I uploaded my site to the production server and I returned the following error:

 

Could not load file or assembly 'Autofac.Configuration, Version=2.5.2.830, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. Access is denied.

 

Please can anyone help on this. I wear a day trying to understand.


Coordinator
Apr 4, 2012 at 3:21 AM

Is the app pool configured to use .net 4.0? How did you upload and what?

Apr 4, 2012 at 2:12 PM
Edited Apr 4, 2012 at 2:14 PM

Yes, the server is configured with Net 4.0 (integrated mode). 

Also I have all the read / write enabled on all directories.

This is the complete answer:

 

 

Server Error in '/' Application.

Could not load file or assembly 'Autofac.Configuration, Version=2.5.2.830, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. Access is denied.

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.FileLoadException: Could not load file or assembly 'Autofac.Configuration, Version=2.5.2.830, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. Access is denied.

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.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'Autofac.Configuration, Version=2.5.2.830, Culture=neutral, PublicKeyToken=17863af14b0044da' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Stack Trace: 

[FileLoadException: Could not load file or assembly 'Autofac.Configuration, Version=2.5.2.830, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. Access is denied.]
   Orchard.Environment.OrchardStarter.CreateHostContainer(Action`1 registrations) in OrchardStarter.cs:155
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in Global.asax.cs:46
   Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) in Starter.cs:89

[ApplicationException: Error during application initialization]
   Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in Starter.cs:63
   Orchard.Web.MvcApplication.Application_BeginRequest() in Global.asax.cs:29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
   System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +57
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

 


Apr 5, 2012 at 8:55 AM

I found that WebMatrix incorporated a feature to test the compatibility with hostingIn that test results in me "unknown". However, support staff and the foot of the page errors indicate that the version of the framework is correct!


This help solve my problem? How could I fix it?

Coordinator
Apr 7, 2012 at 7:38 AM

Does your hosting company have a custom trust level?

Apr 8, 2012 at 2:28 AM

Sorry, had doubled the topic in Customizing Orchard!

--------------------------------------------------------------------------------------------------------------------------------------------

Solved

Although I had configured the hosting panel on "asp.net 4.0 Integrated". Nightsupport people had to make an unanticipated change (which was not on the panel):

5.3.10 Fast CGI php / Net framework 4.0 30319 (fx 4.0) / Integrated

Ready!

They tell me that, perhaps, impersonating the application (<identity impersonate="true"/>), is solved!?

What do you think?

Thank you very much sfmskywalker, your suggestion led me to persist.