|
Subject:
|
User authntication problem
|
|
Posted By:
|
asif_sharif
|
Post Date:
|
12/31/2005 12:30:16 PM
|
Hi, I am making an application in asp.net, in which i want to authenticate user by user id and password but if i use forms authentication its works with two forms and i have more than two forms,because my problem is that after login i want to redirect user to that form which to i want,but using forms authentication how i set the path for redirected page. what i should do, can anyone help me, thanks in advance
asif
|
|
Reply By:
|
planoie
|
Reply Date:
|
1/1/2006 3:47:38 PM
|
Forms authentication can use many forms. The authentication applies to the entire application (using a typicaly setup). Once you are authenticated you can access any form in the application. After you have verified login you can redirect to whatever form you want.
Here are the two typical methods used with forms authentication:
System.Web.Security.FormsAuthentication.RedirectFromLoginPage()
Use this method to issue the authentication cookie and automatically redirect to whatever page the user was trying to access when they were forced to go to the login page to authenticate.
System.Web.Security.FormsAuthentication.SetAuthCookie()
Use this method to issue the cookie without automatic redirect, then issue your own redirect to whatever specific page you want.
-Peter
|
|
Reply By:
|
asif_sharif
|
Reply Date:
|
1/3/2006 10:44:38 AM
|
Thanks for your suggestion
asif
|