我需要以编程方式验证我的网站的IIS配置的ApplicationHost.config
文件。
在这里,我正在阅读ApplicationHost.config
文件,并确保根据网站需要存在所有配置。
我在'Edit Feature Permissions'
下验证'Handler Mapping'
ISAPI-DLL时遇到问题。
当我将ISAPI-DLL的功能权限更改为execute
时,我没有在ApplicationHost.config
文件中获取更新的值。有人可以帮我这个吗?
附加截图
答案 0 :(得分:0)
我解决了我的问题。我在找错了文件。 IIS在Application文件夹的web.config
文件中进行了更改。
因此,要验证是否为{ISAPI-DLL处理程序提供了execute
权限,我会读取节点accessPolicy
的属性handlers
以下是xml示例。
<handlers accessPolicy="Read, Execute, Script">
<remove name="ISAPI-dll" />
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" scriptProcessor="D:\software\_WebNeo_SQL_Sample_Site_1\rest\ttmRESTSrv.dll" resourceType="File" requireAccess="Execute" allowPathInfo="true" preCondition="bitness32" />
</handlers>