Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4325502
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:16:31+00:00 2026-05-21T09:16:31+00:00

This is with reference to a question asked here Login user after signup and

  • 0

This is with reference to a question asked here Login user after signup and here FormsAuthentication.RedirectFromLoginPage reload page.

Though I have answered the first question but i will admit that it’s just “programming by co-incidence”. If you see, answers to above two questions contradict each other but still both worked for 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 usage, we can see a logical difference that Response.Redirect can allow redirecting to any URL as against RedirectFromLoginPage would redirect only to the referrer. But that’s usage difference.

Is there any fundamental diffence in their way of execution? If not, any thoughts why one would work at times and why other at times? what exactly happens under the hood of each of them?

I have google a bit but could not get any concrete answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:16:31+00:00Added an answer on May 21, 2026 at 9:16 am

    If you look at the code in RedirectFromLoginPage it does essentially the same

    • SetAuthCookie
    • get return URL from query string
    • Clear return URL

    Here is a snippet:

        HttpContext current = HttpContext.Current;
        string returnUrl = GetReturnUrl(true);
        if (CookiesSupported || IsPathWithinAppRoot(current, returnUrl))
        {
            SetAuthCookie(userName, createPersistentCookie, strCookiePath);
            returnUrl = RemoveQueryStringVariableFromUrl(returnUrl, FormsCookieName);
            if (!CookiesSupported)
            {
                int index = returnUrl.IndexOf("://", StringComparison.Ordinal);
                if (index > 0)
                {
                    index = returnUrl.IndexOf('/', index + 3);
                    if (index > 0)
                    {
                        returnUrl = returnUrl.Substring(index);
                    }
                }
            }
    

    But it does also check for support for cookie.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is in reference to the question previously asked The problem here is, each
This is in reference to a question I asked before here I received a
This is in reference to another question I asked, though it is its own
This is in reference to a question I asked earlier. Aside from viewing the
This question builds off of a previously asked question: Pass by reference multidimensional array
I'm writing this question with reference to this one which I wrote yesterday. After
Duplicate - this exact question was asked here - the only solution seems to
This is an extension of a question I previously asked here . Long story
This is an offshoot question that's related to another I asked here . I'm
I recently asked this question on here and got the answer. However I'm now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.