0

I was wondering if anyone is hosting asp.net mvc5, identity2 and OWIN on Godaddy deluxe windows with plesk servers yet? I have followed all recommendations posted on the web but it is still not working. I have put same files on another server and the web application runs. I suspect this is a trust level. I have contacted support Godaddy and they are saying their server allows trust level 4 - which is confusing- is that medium trust or full trust? Are they being honest? I want to know if anyone has this type of hosting working before I cancel my hosting

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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: 


[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(Func`3 next, Func`2 activator, IEnumerable`1 referencedAssemblies) +69
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.GetAppStartup() +65
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +28
   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) +534
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
Diin
  • 565
  • 11
  • 41
  • I could be wrong, but I think 4 is minimal. The Enumeration has four possible values and the default is 0 (Full Trust) and the last is Minimal with a value of 4. If so I would abandon that idea entirely and go with Winhost or cloud services instead. – Ryan Mann May 03 '16 at 16:34
  • did you get final solution? – PreguntonCojoneroCabrón Nov 09 '16 at 20:11

1 Answers1

2

I know this is old, but I'm posting the solution so other people that comes to this question can be helped.

You just have to place the full trust element in your web.config, like this:

<system.web>
<trust level="Full" />
</system.web>
juliano.net
  • 7,982
  • 13
  • 70
  • 164