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
Apparently Owin does not support medium trust anymore - take a look at this post for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With