Asp.net mvc 4 我必须使用什么信任级别?

Asp.net mvc 4 我必须使用什么信任级别?,asp.net-mvc-4,Asp.net Mvc 4,我正在启动我的第一个网站。我已经发布了它,我得到了这个错误 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 i

我正在启动我的第一个网站。我已经发布了它,我得到了这个错误

 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. 
现在网站在线,我应该使用什么信任级别

<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
</securityPolicy>
</system.web>

现在我正在将网站上线,是否有其他web.config设置我必须知道?像更改连接字符串一样?

使用

<trust level="Full" />


根据主机提供商的不同,您可能还需要取出编译器

在我使用GoDaddy的经验中,我不得不对我的编译器进行注释,并输入trust level=“Full”

将自定义错误设置为On或RemoteOnly,以便最终用户不会看到任何错误消息,即“死亡黄屏”


..... system.web中的其他设置。。。

您可能正在指定完全信任,但托管公司可能不允许这样做。@QuetiM.Porta正在指定对我的安全有害的完全信任?根据您使用的信任级别,您将无权执行某些任务,对于使用反射作为nHibernate的示例、反射和组件,它需要完全信任级别。Look iy:@FelipeOriani我怎么知道我的主机使用什么信任级别?如何设置应用程序以使用该信任级别?
<system.web>
      <trust level="Full" />
      <customErrors mode="On" />
      ..... other settings in system.web ...
</system.web>

<system.codedom>
     <compilers>
       <!-- <compiler language="..." /> -->
       <!-- <compiler language="..." /> -->
     </compilers>
</system.codedom>