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
How can you register a custom server control to a web page?
Differentiate between namespace and assembly.
Explain the difference between Web Garden and Web Farm?
What is meant by asp.net?
What is a Cookie? Where is it used in ASP.NET?
How does asp page work?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
What is postback pixel?
What is the difference between an htmlinputcheckbox control and an htmlinputradiobutton control?
What is a page life cycle?
Can you clarified A Web service can only be written in .NET or not?
Can we use html in asp.net?
there is two functions function a and function b like fun a(){.... ..... } fun b() { } in function b i write the coding to add two numbers and i need to dispaly the sum result in function a with out using global variable. how we do?
What are sharepoint pages?
Explain the working of passport authentication.