“当站点管理员使用< location allowOverride ="false">锁定了对该部分的访问权限时,来自继承的配置文件. [英] "When the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file."
问题描述
因此,发布ASP.NET MVC应用程序时出现此错误.在本地工作正常:
So I get this error when publishing my ASP.NET MVC application. It works fine locally:
"当网站管理员锁定对此内容的访问权限时,会发生这种情况 从继承的部分使用
<location allowOverride="false">
的部分 配置文件.
" This happens when the site administrator has locked access to this section using
<location allowOverride="false">
from an inherited configuration file.
在修复之前,我有此错误:
I had this error before that I fixed:
"System.Security.SecurityException:请求类型的许可 'System.Security.Permissions.SecurityPermission,mscorlib, 版本= 4.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089' 失败."
"System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
我在Web.config文件中使用了以下代码:
I used the following code in my Web.config file:
<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
</securityPolicy>
那么有人知道我如何将我的"<location allowOverride="false">
更改为true吗?原因一定是问题所在.
So does anyone know how I can change my: "<location allowOverride="false">
to true? Cause that must be the problem.
推荐答案
在IIS管理器中,选择服务器节点,然后在底部的Feature Delegation
中.找到您的功能并将其更改为Read/Write
.
In IIS Manager, select the server node and in the bottom section Feature Delegation
. Find your feature and change it to Read/Write
.
您必须是管理员才能更改此设置.
You have to be an administrator to change this setting.
这篇关于“当站点管理员使用< location allowOverride ="false">锁定了对该部分的访问权限时,来自继承的配置文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!