【发布时间】:2017-03-13 13:57:33
【问题描述】:
我在转换我的 Web.Config 时遇到了下一个问题:
源文档中没有元素匹配 '/configuration/system.web/authorization/allow[@roles='WhateverGroupNameRenamedForProd']'
这是我的 Web.Config:
<system.web>
<compilation targetFramework="4.5.2" debug="true" />
<httpRuntime targetFramework="4.5" />
<authorization>
<allow roles="WhateverGroupName" />
<deny users="*" />
</authorization>
还有 Web.Production.Config:
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<authorization>
<allow roles="WhateverGroupNameRenamedForProd" xdt:Transform="SetAttributes" xdt:Locator="Match(roles)"/>
</authorization>
我做错了什么?在此先感谢:)
【问题讨论】:
标签: web-config authorization roles web.config-transform