3
I would like to restrict access by requesting login to only one page in my application. In webconfig I put so, but obviously this way requires authentication on all pages of the application.
<authentication mode="Forms">
<forms loginUrl="~/Admin/Login.aspx" name=".ASPXFORMSAUTH">
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
I could release the pages like this, one by one:
<location path="Default.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
However, I would like to leave all pages free, except one in the ~/Admin folder/
did not solve so. I want to request login only if the user tries to access a resource, in case a specific page; The other leave free.
– Daniel