why should i use FormsAuthentication.RedirectFromLoginPage
(); Method in Form Authentication?Without using this method
also it's good??

Answers were Sorted based on User's Feedback



why should i use FormsAuthentication.RedirectFromLoginPage (); Method in Form Authentication?Withou..

Answer / 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

why should i use FormsAuthentication.RedirectFromLoginPage (); Method in Form Authentication?Withou..

Answer / irfanpathan

to get the login page directly into our page we use this FormsAuthentication.RedirectfromLoginPage(). with out using this mehod also we can get the login page through WWT through drag and drop

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More ASP.NET Interview Questions

how can i insert array values and retreive in asp.net

3 Answers   TCS, Value Labs,


How many types of triggers are there in update panel?

0 Answers  


Explain how is a property designated as read-only?

0 Answers  


What is the difference between excute query and excute nonquery.?

4 Answers  


What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?

2 Answers  






How can we call webservices in Banking Applications? and where we are using it?

0 Answers   FCG,


What is application session?

0 Answers  


What is server side in asp.net?

0 Answers  


Is asp.net still used?

0 Answers  


Contrast the use of an abstract base class against an interface?

5 Answers   iLink,


When is an object collected by the Garbage Collector? [Four options were given]

1 Answers   ABC,


What is the default timeout for a cookie?

0 Answers  


Categories