asp.net web form Form Authentication - Error 401.2, please help

0

I have a web project asp.net wen form, in emi web config I have the following:

As you can see, it's quite simple, but when it comes to running the project, it sends me the following error:

The properties of the project are:

I went around everywhere and I can not identify why I have the problem, someone can help me please.

I thank you in advance, cordial greetings to all.

    
asked by RSillerico 07.04.2017 в 15:42
source

2 answers

0

There may be many reasons, but the most common is that anonymous authentication is disabled. In the Properties of your Application verify that it is Enabled. Click on the name of your application in the Solution Explorer and press F4 to see the properties:

    
answered by 07.04.2017 в 16:05
0

It is a configuration issue, at no time you are authorizing access your Login.apx anonymously. You are restricting anonymous to all your forms <deny users="?"/> .

You should use:

<configuration>

<system.web>
    <authentication mode="Forms"/>

    <authorization> 
        <deny users="?"/>  // Restringir anónimos
    </authorization>

</system.web>

<location path="Login.aspx"> // Debería estar habilitada para todos
    <system.web>
        <authorization>
            <allow users="*"/> // Permitir a todos acceder
        </authorization>
    </system.web>
</location>

</configuration>

When you ask a question, use text and not images.

    
answered by 07.04.2017 в 17:05