Я создал совершенно новое приложение Visual Studio 2013 ASp.net MVC из шаблона MVC по умолчанию. Однако я получаю сообщение об ошибке Запрос на разрешение типа "Ошибка System.Security.Permissions.ReflectionPermission.
Можно ли отключить это разрешение Reflection, чтобы сайт все еще работал?
вот мой web.config
<?xml version="1.0" encoding="utf-8"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=301880
    -->
    <configuration>
    <configSections>
      <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    </configSections>
    <connectionStrings>
      <add name="MyDb" connectionString="Data Source=x.x.com;Initial Catalog=x;User Id=x;Password=x;" providerName="System.Data.SqlClient" />
    </connectionStrings>
    <appSettings>
      <add key="webpages:Version" value="3.0.0.0" />
      <add key="webpages:Enabled" value="false" />
      <add key="ClientValidationEnabled" value="true" />
      <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    </appSettings>
    <system.web>
    <trust level="Full" />
      <customErrors mode="Off"/>
      <authentication mode="None" />
      <compilation targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>
    <system.webServer>
      <modules>
        <remove name="FormsAuthenticationModule" />
      </modules>
    </system.webServer>
    <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
          <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
          <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
          <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
          <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
          <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
        </dependentAssembly>
      </assemblyBinding>
    </runtime>
    <entityFramework>
      <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
        <parameters>
          <parameter value="v11.0" />
        </parameters>
      </defaultConnectionFactory>
      <providers>
        <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      </providers>
    </entityFramework>
    </configuration>
Сведения об исключении: System.Security.SecurityException: запрос на разрешение типа 'System.Security.Permissions.ReflectionPermission, mscorlib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' не удалось.
[SecurityException: запрос на разрешение типa > 'System.Security.Permissions.ReflectionPermission, mscorlib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' не удалось.] System.Delegate.DelegateConstruct(целевой объект, интервал IntPtr) +0 Owin.Loader.DefaultLoader..ctor(Func
3 next, Func2 активатор, IEnumerable1 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, Func1 valueFactory) +115 Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(контекст HttpApplication) +106 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, контекст HttpContext, обработчики MethodInfo []) +418 System.Web.HttpApplication.InitSpecial(состояние HttpApplicationState, обработчики MethodInfo [], контекст приложения IntPtr, контекст HttpContext) +172 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(контекст приложения IntPtr, контекст HttpContext) +336 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
Я попытался добавить
<trust level="Full" />
в мой раздел Web.Config system.Web, но это не сработало, поскольку я получил
Этот раздел конфигурации не может использоваться на этом пути. Это происходит, когда администратор сайта заблокировал доступ к этому разделу с помощью унаследованного файла конфигурации.
это общий хостинг на сайте 1and1.com, и они не дадут мне полного доверия.
