Hello all you greate Pro.
I am developing a three pages website for practice. I have used Login page, AdminHomePage,and Containt Page.
Home.aspx kept in Root Folder, Login.aspx contain in Admin folder and AdminHome.aspx in Secure Folder.
I Configured win.config as follows.
%26lt;location path="Admin/Secure"%26gt;
%26lt;system.web%26gt;
%26lt;authorization%26gt;
%26lt;allow users="?"/%26gt;
%26lt;deny users="*"/%26gt;
%26lt;/authorization%26gt;
%26lt;system.web%26gt;
%26lt;/location%26gt;
I also write codes in Login.aspx Login Buton as follows
protected sub btnLogin(....)
{
if(FormAuthentication.Authenticate(txtus...
{
Session["SesIS"]=Session.SessionID
FormsAthunticate.redirectfromloginpage(t...
}
}
}
How can I authenticate my website developed in asp.net and c#.net (Practice) with the help of win.config?
Look over you code:
%26lt;allow users="?"/%26gt;
%26lt;deny users="*"/%26gt;
try
%26lt;allow users="*"/%26gt;
%26lt;deny users="?"/%26gt;
This will allow all authenticated users and deny any unknown users..
You are allowing anonymous users then denying all users.
Go to http://www.msdn.com or http://www.asp.net to learn more.
cabbage
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment