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


Please Help Members By Posting Answers For Below Questions

How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

2579


Explain serialization and deserialization?

768


Apart from IDE what are the enhancements in asp.net 2.0?

1845


Please briefly explain the usage of global.asax?

723


what is loosely coupled solution? How it can be used?

773


1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5

1964


Web API supports which protocol?

1123


What is active web page?

732


What is a runtime version?

719


Mention few asp.net validators.

753


How to create discussion forum in asp.net mvc? : Asp.Net MVC

749


What's the use of response.output.write()?

993


When we use cookie less session? Explain its working?

766


Explain the difference between server control and html control.

691


What are the ways to sending the data in ASP.NET page?

749