VIJAY
VIJAY

Reputation: 849

Location tag in web.config for authorization

In project their is a folder namely customer, inside there is a file namely register.aspx. In web.config have the configuration check like follows

    <location path="Customer">
    <system.web>
        <authorization>
            <deny users="?"/>
        </authorization>
    </system.web>
</location>

<location path="Customer/Register.aspx">
    <system.web>
        <authorization>
            <allow users="?"/>
        </authorization>
    </system.web>
</location>

Even i have authorized the register.aspx for unauthorized users but is expecting to authorize. Can any body explain it.

Upvotes: 0

Views: 3177

Answers (2)

Eranga
Eranga

Reputation: 32437

You have to create a Web.Config file in Customer folder and add

<location path="Register.aspx">
    <system.web>
        <authorization>
            <allow users="?"/>
        </authorization>
    </system.web>
</location>

Upvotes: 1

Kon
Kon

Reputation: 27441

Try switching order of those location nodes. Put allow Register first, and deny Customer second.

Upvotes: 0

Related Questions