FormsAuthentication.RedirectFromLoginPage problem

Discussion in 'ASP .Net' started by BoltonWolf, Mar 8, 2005.

  1. BoltonWolf

    BoltonWolf Guest

    Hi,

    I have a ASP.Net web site, that we sell as a module to our core
    software, versions of this site are running fine on many servers,
    however we are having problems with our latest installtion, and it's
    got me scratching my head.

    The problem is with FormsAuthentication.RedirectFromLoginPage, it's
    running on a brand new Windows 2003 standard server. No matter what I
    do I cannot log onto the web site. It's as if it's not writing cookies
    or something.

    When some one enters a user name and password it validates ok, telling
    them if they've got it wrong, but if they enter the correct details,
    and I call FormsAuthentication.RedirectFromLoginPage, all it does is
    return to the Logon Page rather than redirecting them back to the
    calling page.

    If I copy all the files from this site to a different server, it works
    fine. So I know it must be a setting I've missed on the server.

    Does anybody have any ideas.

    Many thanks in advance

    Chris
     
    BoltonWolf, Mar 8, 2005
    #1
    1. Advertising

  2. BoltonWolf

    Guest

    Is the domain hard coded in the application?
    Have you tried with multiple browsers?
    Have you made sure the server's and client's time is properly synced?
    Have you tried debugging it and seeing variables and cookies as they
    are being set and then where they are upon the next page redirect
     
    , Mar 8, 2005
    #2
    1. Advertising

  3. BoltonWolf

    BoltonWolf Guest

    >Is the domain hard coded in the application?
    No, the site need to be flexible enought to be run from any domain

    >Have you tried with multiple browsers?

    Only multiple instances of IE, as this is our target audience.

    >Have you made sure the server's and client's time is properly synced?

    It doesn't work if I use the browser on the server, so this rules this
    out.

    >Have you tried debugging it and seeing variables and cookies as they
    >are being set and then where they are upon the next page redirect?

    I'm not sure how I debug the cookie when using FormsRedirect, but the
    exact same site on a different server will work fine

    On 8 Mar 2005 09:23:34 -0800, ""
    <> wrote:

    >Is the domain hard coded in the application?
    >Have you tried with multiple browsers?
    >Have you made sure the server's and client's time is properly synced?
    >Have you tried debugging it and seeing variables and cookies as they
    >are being set and then where they are upon the next page redirect
     
    BoltonWolf, Mar 9, 2005
    #3
  4. BoltonWolf

    Guest

    That is why it "sounds" like
    Cookie problem
    Ultimately server side cookie problems usually come down to 2 things
    #1 - somebody accidentally hard coded a domain into the code
    #2 - You are working off of a subdomain and are not setting the cookie
    up to handle this
    #3 - Somebodys time is off sync
    or either a very obsecure/strange configuration problem that I have
    never rune across.

    If you have debugging setup on your server then this is extremely easy.
    You merely fire up vs.net with your project loaded. Put a breakpoint in
    your forms authentication procedure and put a breakpoint on the
    location it is redirected to.
    Then you Step through it. As you step through it you add related
    variables to your Watchwindow, such as username/password, The Cookies
    collection. and you monitor and analyze the values as the page is
    authenticated and as the page is redirected. This will usually clue you
    in as to what the problem is and then you can begin a much more direct
    line of attack
     
    , Mar 9, 2005
    #4
  5. BoltonWolf

    Meadow Guest

    Meadow, Oct 28, 2005
    #5
  6. I had the same problem. When trying to login to a forms-authentication
    protected site from IE, IE wouldn't redirect properly eventhough the user was
    properly authenticated. However, accessing the site through Firefox worked
    just fine. After some investigation it turned out that the date on the server
    was a month behind. Once I corrected the date setting IE functioned properly.
    I can only speculate that the cookie was seen as expired by IE becuase of the
    date difference.

    It's still seems rather odd that Firefox accepted it just fine and dandy
    though.

    Eric

    "Meadow" wrote:

    > Hello, i've got the same problem, but only when i try to access my site from my domain, when i use localhost it works fine, but when i use my domain www.mysitename.com IE doesn't redirect, but Mozilla does... i can't figure out what this depends on, please help
    >
    > From http://www.developmentnow.com/g/8_2...hentication-RedirectFromLoginPage-problem.htm
    >
    > Posted via DevelopmentNow.com Groups
    > http://www.developmentnow.com
    >
     
    =?Utf-8?B?RXJpYyBXaWxzb24=?=, Jan 5, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TaeHo Yoo
    Replies:
    1
    Views:
    522
    Teemu Keiski
    Jul 9, 2003
  2. Lauchlan M
    Replies:
    2
    Views:
    496
    John Saunders
    Aug 17, 2003
  3. Eric Broers
    Replies:
    1
    Views:
    811
    Steve C. Orr [MVP, MCSD]
    Nov 27, 2003
  4. Niels Schoot
    Replies:
    0
    Views:
    424
    Niels Schoot
    Mar 14, 2005
  5. Holysmoke
    Replies:
    0
    Views:
    122
    Holysmoke
    Sep 30, 2004
Loading...

Share This Page