Authorization in asp.net

Posted by Priya under ASP.NET on 7/1/2008 | Views : 1868 | Status : [Member] | Replies : 3
I am new to asp.net. How I can use Authorization in asp.net.Please send me some sample code

Thanks in advance.




Responses

Posted by: Raja on: 7/1/2008 [Member] Starter

Up
0
Down
You can refer to following article

http://www.aspfree.com/c/a/IIS/Authentication-and-Authorization/

http://www.c-sharpcorner.com/UploadFile/lmoningi/AuthenticationAndAuthorizatio11252005233533PM/AuthenticationAndAuthorizatio.aspx

Regards,
Raja, USA

Priya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Priya on: 7/1/2008 [Member] Starter

Up
0
Down
hi,
Thanks for reply.I need some explanation and working sample on Authorization.

thanks in advance


Priya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Majith on: 7/24/2008 [Member] Starter

Up
0
Down
The Following Scenario expalin clearly about Authentication and Authorization .

Authentication is the process to validate the user's credentials. After the identity is authenticated,the next process called authorization.

EX: The web application may have multiple users and need access to a system in order to do specific tasks. Each user would have a specific role and responsiblities according to the nature of job and security level.

In a web.config file the code as follow as

<authentication mode="Forms">

<forms loginUrl="Login.aspx">
</forms>
</authentication>

<authorization>
<deny users="?" />
<!-- Allow all users -->
-->
</authorization>


code for specific pages and role.

location means the folder name which holds the .aspx page
<allow roles="ADMIN" /><deny users="*" /> means deny every users from accessing the pages except ADMIN.


<location path="ADMIN">
<system.web>
<authorization>
<allow roles="Admin" />
<deny users="*" />
</authorization>
</system.web>
</location>

further details code visit:
http://www.codeproject.com/KB/web-security/formsroleauth.aspx

Thanx


Priya, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response