Sunday, April 15, 2012

Mange Form authentication and authorization using web config file??

Following code demonstrate the way it can be implement.
<authentication mode="Forms">
<forms loginUrl="login page url" timeout="30"></forms>
</authentication>


Then you should show the location which need to be restricted from anonymous users.
After the <system.web/> tag we can write following code to above purpose. It's pretty cool, isn't it..?

<location path="FolderNameAuthenticationNeed" allowOverride="true"> <system.web>
<authorization> <deny users="?"/>
</authorization> </system.web> </location>

No comments:

Post a Comment