在godaddy中等信任级别下的Entity Framework 6和System.Security.Permissions.ReflectionPermission

Sha*_*del 8 asp.net-mvc entity-framework

我正在尝试将应用程序部署到godaddy.我的托管版ASP.Net 4.0/4.5.在http://onpremlab.com/上, 它可以在我的本地环境中正常工作.使用VS 2013 Preview for Web和EF 6.0 Beta构建.

但是当部署时抛出

[SecurityException: Request for the permission of type    'System.Security.Permissions.ReflectionPermission,
Run Code Online (Sandbox Code Playgroud)

我已经使用EF5.0在VS 2012中构建了另一个应用程序到godaddy,这非常有效.

EF 6.0中是否有任何改变导致它.我搜索了一下,发现关于godaddy中等信任级别是否有针对EF 6.0的任何解决方法

另一点是这个项目部署在托管帐户的子文件夹中,如果它有任何区别.

更新..

堆栈跟踪:

[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Delegate.DelegateConstruct(Object target, IntPtr slot) +0
   Owin.Loader.DefaultLoader..ctor() +47
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +66
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +106
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
Run Code Online (Sandbox Code Playgroud)

Paw*_*wel 1

显然 Owin 不再支持中等信任 - 请查看这篇文章了解更多详细信息。

  • 您认为在 web.config 中显式定义 <trust level="Full" /> 可能有帮助吗???我正在等待 godaddy 的 FTP 管理器加载。 (2认同)