Server Error in '/' Application

Topics: Customizing Orchard, General, Installing Orchard
Apr 3, 2012 at 5:31 AM

Hey.
I am new to Orchard, but I've made ​​a local site and I found great capacity to achieve quite complex and professional site with minimal effort!
My problem starts when I uploaded to the remote server.
I get the following error:

 

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) +0
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Global.asax.cs:46
   Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) in C:\Users\sebros\My Projects\Orchard\src\Orchard.WarmupStarter\Starter.cs:89

[ApplicationException: Error during application initialization]
   Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in C:\Users\sebros\My Projects\Orchard\src\Orchard.WarmupStarter\Starter.cs:63
   Orchard.Web.MvcApplication.Application_BeginRequest() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\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

 

Is there any way to fix this without interfering much in the code? Unless someone explain to me patiently what I do.

I appreciate the help I can provide.

 


Coordinator
Apr 3, 2012 at 5:41 AM

Maybe your hosting company has a weird custom trust level set-up?

Apr 3, 2012 at 5:53 AM
Edited Apr 3, 2012 at 5:54 AM

Thanks for responding.

Actually, I have no idea!
But then I installed in this server nopCommerce sites without any problem.

Apr 3, 2012 at 5:59 AM
Edited Apr 3, 2012 at 6:02 AM

Perhaps it is best to upload all files again?

This time I did with Matrix for the first time. I usually use Filezilla.

Apr 3, 2012 at 1:13 PM
Edited Apr 3, 2012 at 1:14 PM

I decided to upload the entire site again and this is the result:

 

Server Error in '/' Application.

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

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.Runtime.InteropServices.COMException: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

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: 

[COMException (0x8000ffff): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
   System.Security.Policy.PolicyLevel.GenericResolve(Evidence evidence, Boolean& allConst) +3839189
   System.Security.Policy.PolicyLevel.Resolve(Evidence evidence, Int32 count, Byte[] serializedEvidence) +228
   System.Security.Policy.PolicyLevel.Resolve(Evidence evidence) +8
   System.Web.Hosting.AspNetHostSecurityManager.ResolvePolicy(Evidence evidence) +191
   System.Security.CodeAccessSecurityEngine.TryResolveGrantSet(Evidence evidence, PermissionSet& grantSet) +147
   System.Security.CodeAccessSecurityEngine.ResolveGrantSet(Evidence evidence, Int32& specialFlags, Boolean checkExecutionPermission) +44

[FileLoadException: Could not load file or assembly 'Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7' or one of its dependencies. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7' or one of its dependencies. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

[HttpException (0x80004005): Could not load file or assembly 'Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7' or one of its dependencies. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090044
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256



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

Apr 3, 2012 at 1:26 PM

When refreshing the page, get this:

 

Server Error in '/' Application.

Access to the path '\\hmfsw\web\DTC008\pierdapesodeinmediato.com\public_html\App_Data\Dependencies' 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.UnauthorizedAccessException: Access to the path '\\hmfsw\web\DTC008\pierdapesodeinmediato.com\public_html\App_Data\Dependencies' is denied. 

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. 

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

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: 

[UnauthorizedAccessException: Access to the path '\\hmfsw\web\DTC008\pierdapesodeinmediato.com\public_html\App_Data\Dependencies' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9723742
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj) +9494138
   System.IO.Directory.CreateDirectory(String path) +146
   Orchard.FileSystems.AppData.AppDataFolder.CreateDirectory(String path) in AppDataFolder.cs:187
   Orchard.FileSystems.Dependencies.DefaultDependenciesFolder.<LoadDescriptors>b__3(AcquireContext`1 ctx) in DefaultDependenciesFolder.cs:38
   Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in Cache.cs:57
   Orchard.Caching.<>c__DisplayClass2.<Get>b__0(TKey k) in Cache.cs:19
   System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory) +125
   Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in Cache.cs:17
   Orchard.Caching.DefaultCacheManager.Get(TKey key, Func`2 acquire) in DefaultCacheManager.cs:33
   Orchard.FileSystems.Dependencies.DefaultDependenciesFolder.LoadDescriptors() in DefaultDependenciesFolder.cs:36
   Orchard.Environment.Extensions.ExtensionLoaderCoordinator.CreateLoadingContext() in ExtensionLoaderCoordinator.cs:196
   Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions() in ExtensionLoaderCoordinator.cs:55
   Orchard.Environment.DefaultOrchardHost.BuildCurrent() in DefaultOrchardHost.cs:102
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in DefaultOrchardHost.cs:68
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in Global.asax.cs:48
   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 3, 2012 at 7:05 PM

Please, any suggestions ...

Developer
Apr 3, 2012 at 10:21 PM

Looks like your website doesn't have write access to the App_Data folder.

Apr 5, 2012 at 9:02 AM

All folders are read / write

Developer
Apr 5, 2012 at 12:33 PM

Well, it looks to me that this isn't an issue whith Orchard, but a configuration issue on the webserver. Did you show the entire error message to your hosting provider? Could they try to give 'everyone' access to App_Data. Just for the sake if isolating the problem, of course.

Apr 5, 2012 at 4:35 PM

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.