3
votes

I am trying to do an IIs config on a windows 2012 server using the appcmd.exe and trying to run :

C:\Windows\System32\inetsrv\appcmd.exe set config /section:isapiCgiRestriction /[path='^%windir^%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'].allowed:true

But it gives me an error :

ERROR ( message:Cannot find requested collection element. )

I have tried http://forums.iis.net/t/1181607.aspx where the user suggests placing '^' also c:\windows\system32\inetsrv\appcmd set config -section:isapiCgiRestriction “/[path=’C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll’].allowed:True”

but i keep getting the same error. Any suggestions.

1
Same problem, as of yet no solution! - JosephDoggie

1 Answers

0
votes

It could be configured via powershell.

Set-WebConfiguration -pspath 'MACHINE/WEBROOT/APPHOST' -filter system.webServer/security/isapiCgiRestriction -value @{description='ASP.NET v4.0.30319 (64-bit)';path='%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll';allowed='True'}