I am using a custom error page in IIS 6:
<customErrors redirectMode="ResponseRedirect" mode="On" defaultRedirect="Error2.aspx"/>
I want to disable authentication for the user error page because the error occurred is related to the authentication module, and I do not want to end up in an infinite loop, and I want to show the user a clean error page. I tried the following configuration to do this.
<location path="Error2.aspx">
<system.web>
<authentication mode="None"/>
<authorization>
<allow users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
I get a System.Configuration.ConfigurationErrorsException for a string that sets authentication mode.
An error occurred while using a section registered as allowDefinition = 'MachineToApplication' that is higher than the application level. This error can be caused by the fact that the virtual directory is not configured as an application in IIS.
, web.config. IIS, . , IIS, Windows ( ).