I need to verify ApplicationHost.config
file for the IIS configuration for my website, programmatically.
Here I am reading the ApplicationHost.config
file and making sure that all the configuration exists as per website needs.
I am facing problem while verifying 'Edit Feature Permissions'
for ISAPI-DLL under 'Handler Mapping'
.
When I change Feature Permission for ISAPI-DLL to execute
I am not getting the updated value in the ApplicationHost.config
file. Could someone please help me on this ?
Attached Screenshot
I solved my problem. I was looking in the wrong file. IIS made changes in the web.config
file of the Application folder.
So to validate whether execute
permission is given to ISAPI-DLL handler I read the attribute accessPolicy
of Node handlers
Below are the sample 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>