2013-08-20 175 views
0

我正在启动我的第一个网站。我已经发布了它,并且出现此错误。我必须使用什么trustlevel?

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设置我现在必须注意我把网站在线?像改变连接字符串?

+0

你可能会指定完全信任,但托管公司可能不会允许该固定它。 –

+0

@ QuetiM.Porta是否指定了对我的安全有害的完全信任? – user1534664

+0

根据您使用的信任级别,您将无权执行某些任务,对于使用反射作为nHibernate的示例,反射和组件,它需要完全信任级别。请看iy:http://msdn.microsoft.com/en-us/library/wyts434y(v=vs.100).aspx –

回答

0

使用

<trust level="Full" /> 

<system.web>