什么是信任级别的问题在ASP.Net MVC的原因是什么? [英] What is the cause of Trust Level Issue in ASP.Net MVC?

查看:82
本文介绍了什么是信任级别的问题在ASP.Net MVC的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有ASP.Net MVC 4.5网站。我主持我的共享服务器上的网站,但每次我创建的子域或域,我得到下面的错误

I have ASP.Net 4.5 MVC site. I have hosted my site on shared server, but everytime I create subdomain or domain I get the below error

在应用程序试图执行不是由安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系或更改配置文件中的应用程序的信任级别。

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.

我是询问这里什么768,16做些什么来解决这个错误,我知道了。

I am NOT asking here what shoud I do to fix this error,that I know.

但我的问题是


  • 什么样的​​操作是造成这种信任级别问题?

  • 我应该在我的地盘发生变化,因此,如果信任级别设置为中等(比全除外),它呈现应有的作用。

推荐答案

默认情况下,ASP.NET信任级别设置网站是一个定制的高度信任应该是适合大多数ASP.NET网站。

By default the ASP.NET Trust Level set for websites is a Custom High Level Trust which should be adequate for most ASP.NET websites.

在某些情况下,你可能会发现,较高的ASP.NET信任级别是​​必需的。如果应用程序需要完全信任,你可以通过添加以下到你的web.config文件来覆盖在应用程序级别的信任级别。

In some circumstances you may find that a higher ASP.NET Trust level is required. If your application requires Full Trust, you can override the trust level at the application level by adding the following to your web.config file.

要放在自己的网站中,以完全信任你需要放置code以下到您的网站的web.config文件中的配置\\ System.Web程序部分: -

To place your website in to Full Trust you need to place the code below in to the 'configuration\system.web' section of your website web.config file:-

如果您的网站的web.config文件没有低于配置\\ System.Web程序部分是包括web.config文件中的这些部分的例子: -

If your websites web.config file does not have a 'configuration\system.web' section below is an example that includes these sections of the web.config file:-

<configuration> 
     <system.web> 
          <trust level="Full" /> 
     </system.web> 
</configuration>

您可以参考这个链接的原因采用不同信任级别的:的 https://msdn.microsoft.com/en-IN/library/tkscy493(v = vs.85)的.aspx

You might refer this link for reason of using different trust level:https://msdn.microsoft.com/en-IN/library/tkscy493(v=vs.85).aspx

这篇关于什么是信任级别的问题在ASP.Net MVC的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆