I'm restricting access to certain folders in an IIS 7.5 web application based on IP address. Here is a segment from applicationHost.config:
<ipSecurity allowUnlisted="false"><add ipAddress="172.16.0.0" subnetMask="255.240.0.0" allowed="true" /></ipSecurity>
This returns a 403 Forbidden page and works as expected. But, I want it to return 404 Not Found instead. When I try the following code, however, I instead get a 500 error:
<ipSecurity allowUnlisted="false" denyAction="NotFound"><add ipAddress="172.16.0.0" subnetMask="255.240.0.0" allowed="true" /></ipSecurity>
I've searched on Google but have found no answer.