why should i use FormsAuthentication.RedirectFromLoginPage
(); Method in Form Authentication?Without using this method
also it's good??
Answer Posted / uday kumar vuriti
FormsAuthentication.RedirectfromLoginPage() redirect the
user to the requested page without redirecting to default page.
Assume that we have 4 Pages and we are using forms
authentication with Login Page as Login.aspx and default
Redirection after Login Page as Home.aspx
MyApp/Login.aspx
MyApp/Home.aspx
MyApp/Profile.aspx
MyApp/Inbox.aspx
With FormsAuthentication.RedirectfromLoginPage():
If user requested for MyApp/Profile.aspx with out
Authentication Cookie(Login), he will be redirected to Login
Page and then after Login he will be redirected to
MyApp/Profile.aspx.
With out FormsAuthentication.RedirectfromLoginPage():
If we are not using
FormsAuthentication.RedirectfromLoginPage() then If user
requested for MyApp/Profile.aspx with out Logging in, he
will be redirected to Login Page and then after Login he
will be redirected to MyApp/Home.aspx.
the difference here is direct redirection of user to the
requested page.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Which two new properties are added in asp.net 4.0 page class?
If you have an application with multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers by using round-robbin load balancing. Explain which is the best approach to maintain login-in state for the users?
What is http post and http get?
What is session in asp.net?
Describe the sequence of action takes place on the server when ASP.NET application starts first time?
What is the difference between union and structure?
What types of data validation events are commonly seen in the client-side form validation?
What are server objects?
What is session in http request?
What is the syntax for datagrid and specifying columns?
Write code to send e-mail from an asp.net application?
What is the purpose of App_Code folder in ASP.NET? Why we this?
What r the asp.net list controls and difference between them?
What is asp net objects?
What is the difference between the response.write() and response.output.write() methods?