This is with reference to the question asked here Login the user after registration and here the FormsAuthentication.RedirectFromLoginPage reload page .
Although I answered the first question, but I admit that this is just "co-drop programming." If you see, the answers to the two questions above are contradictory, but both of them work for the respective users.
I would like to know what is the exact difference between this
FormsAuthentication.SetAuthCookie(USER_NAME, true); Response.Redirect("copyPastPage.aspx");
And this FormsAuthentication.RedirectFromLoginPage(mainSignUp.UserName, true);
In terms of use, we can see the logical difference that Response.Redirect can allow redirection to any URL, since RedirectFromLoginPage will redirect only to the referrer. But this difference in use.
Is there any fundamental difference in their way of doing it? If not, then some thoughts why everyone will work from time to time and why others from time to time? what exactly happens under the hood of each of them?
I have a little Google, but I canβt get any specific answer.
source share