0

在网上阅读了 Orchard CMS 可以安装在共享主机上之后,我尝试在带有 MySQL 数据库的 Godaddy Web Hosting 上安装 Orchard CMS 1.6。我执行了以下步骤 -

  • 验证我的根目录设置为集成管道模式。
  • 从 Codeplex 下载 ZIP 包并上传到我的主机帐户的根目录
  • 在 Godaddy 文件管理器中,将写入权限设置为以下文件夹(App_Data、Config、Themes、Media、Modules)
  • 还创建了一个MYSQL数据库

当我第一次访问 Orchard时出现内部服务器错误,为了查看错误消息,我修改了 Web.config 并收到一条长错误消息,如下所示

Server Error in '/' Application.
Inheritance security rules violated while overriding member: 'log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

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.TypeLoadException: Inheritance security rules violated while overriding member: 'log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

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:
[TypeLoadException: Inheritance security rules violated while overriding member: 'log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
log4net.Repository.Hierarchy.Hierarchy..ctor(ILoggerFactory loggerFactory) +0
log4net.Repository.Hierarchy.Hierarchy..ctor() +22

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
log4net.Core.DefaultRepositorySelector.CreateRepository(String repositoryName, Type repositoryType) +509
log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositoryAssembly, Type repositoryType, String repositoryName, Boolean readAssemblyAttributes) +457
log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly repositoryAssembly, Type repositoryType) +17
log4net.Core.DefaultRepositorySelector.GetRepository(Assembly repositoryAssembly) +42
log4net.Core.LoggerManager.GetLogger(Assembly repositoryAssembly, String name) +55
log4net.LogManager.GetLogger(Assembly repositoryAssembly, String name) +8
log4net.LogManager.GetLogger(String name) +20
Orchard.Logging.OrchardLog4netFactory.Create(String name) in OrchardLog4netFactory.cs:28
Castle.Core.Logging.AbstractLoggerFactory.Create(Type type) +31
Orchard.Logging.CastleLoggerFactory.CreateLogger(Type type) in CastleLoggerFactory.cs:12
Orchard.Logging.LoggingModule.CreateLogger(IComponentContext context, IEnumerable`1 parameters) in LoggingModule.cs:75
Autofac.Builder.<>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) +17
Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +30
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +48
Autofac.Core.Resolving.InstanceLookup.Execute() +48
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +167
Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +23
Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +72
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +54
Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +121
Orchard.Logging.<>c__DisplayClass11.<BuildLoggerInjectors>b__8(String key) in LoggingModule.cs:65
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +72
Orchard.Logging.<>c__DisplayClassf.<BuildLoggerInjectors>b__7(IComponentContext ctx, Object instance) in LoggingModule.cs:65
Orchard.Logging.<>c__DisplayClass1.<AttachToComponentRegistration>b__0(Object s, ActivatedEventArgs`1 e) in LoggingModule.cs:40
Autofac.Core.Registration.ComponentRegistration.RaiseActivated(IComponentContext context, IEnumerable`1 parameters, Object instance) +70
Autofac.Core.Resolving.InstanceLookup.Complete() +85
Autofac.Core.Resolving.ResolveOperation.CompleteActivations() +114
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +207
Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +50

[DependencyResolutionException: An exception was thrown while executing a resolve operation. See the InnerException for details.]
Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +119
Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +159
Autofac.Core.Container.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +17
Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +72
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +54
Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +121
Orchard.Environment.OrchardStarter.CreateHostContainer(Action`1 registrations) in OrchardStarter.cs:132
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 

以前有没有人见过这个错误,我是 Orchard 和 ASP.NET MVC 的新手

请帮忙,谢谢。

4

2 回答 2

1

GoDaddy 显然没有给你完全的信任,这是必需的。今天没有充分的理由让主机不给予完全信任。您应该尝试找到一家好的托管公司。

更新:GoDaddy 现在提供完全信任,并且可以在那里运行 Orchard。出于多种原因,我个人不喜欢这样做,但这可能有点离题。

于 2013-04-02T06:16:28.043 回答
0

为了在 godaddy 上托管 orchid cms,您需要对在共享托管下不允许的程序集具有读/写/删除权限。您需要完全访问和完全信任,就像 roy 说的那样,您必须拥有完全信任的专用托管或共享托管。

谢谢

于 2013-04-02T06:39:31.087 回答