Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework 6 and System.Security.Permissions.ReflectionPermission under godaddy medium trust level [duplicate]

I am trying to deploy an application to godaddy. My hosting version ASP.Net 4.0/4.5. On http://onpremlab.com/ it works fine on my local environment. Build with VS 2013 Preview for web and EF 6.0 Beta.

But when deployed throws

[SecurityException: Request for the permission of type    'System.Security.Permissions.ReflectionPermission,

I have deployed another application to godaddy built in VS 2012 with EF5.0 That works perfect.

Is there any change in EF 6.0 thats Causing it. I searched about it and found about godaddy medium trust level is there any workaround for it for EF 6.0

Another point is this project is deployed in a sub folder of hosting account if it makes any difference.

Update..

Stack Trace:

[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
like image 298
Shanker Paudel Avatar asked Aug 09 '13 13:08

Shanker Paudel


1 Answers

Apparently Owin does not support medium trust anymore - take a look at this post for more details.

like image 73
Pawel Avatar answered Nov 13 '22 08:11

Pawel