Form Authentication problem

Discussion in 'ASP .Net' started by Philip Rayne, Jul 5, 2004.

  1. Philip Rayne

    Philip Rayne Guest

    I am hosting a website on my home PC. I have a dynamic IP address so I use
    a domain name that automatically gets updated with my IP address by my
    router. This domain name is something like rayne.mydns.org

    When I try and login to my home website via this domain name I have no
    problems with my form authentication. I get redirected to my default.aspx
    page.

    However, I have my own registered domain name (for example rayne.co.uk)
    which has been setup to forward to the rayne.homedns.org domain name. When
    I access my site via this rayne.co.uk URL my login authentication does not
    appear to work. Has anyone any idea as to what might be going on?
     
    Philip Rayne, Jul 5, 2004
    #1
    1. Advertising

  2. "Philip Rayne" <> wrote in message
    news:ccbmsp$gj4$1$...
    > I am hosting a website on my home PC. I have a dynamic IP address so I

    use
    > a domain name that automatically gets updated with my IP address by my
    > router. This domain name is something like rayne.mydns.org
    >
    > When I try and login to my home website via this domain name I have no
    > problems with my form authentication. I get redirected to my default.aspx
    > page.
    >
    > However, I have my own registered domain name (for example rayne.co.uk)
    > which has been setup to forward to the rayne.homedns.org domain name.

    When
    > I access my site via this rayne.co.uk URL my login authentication does not
    > appear to work. Has anyone any idea as to what might be going on?


    Forms Authentication uses cookies. Cookies are sent by the client browser to
    the server. Each cookie is associated with a domain. The cookie will only be
    sent to sites which match its domain.

    I suspect that you have a login cookie from rayne.mydns.org, and are trying
    to use it on rayne.co.uk. This won't work, as the domains are different.

    You would have to set the cookie domain to the empty string in order for
    this to work. That does mean that the cookie will be sent to every site,
    however.
    --
    John Saunders
    johnwsaundersiii at hotmail
     
    John Saunders, Jul 5, 2004
    #2
    1. Advertising

  3. Philip Rayne

    Philip Rayne Guest

    Hi, I'm not to sure what you mean by this.

    I am using the forms authentication Form
    FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, True) method
    with the web.config specifiying my cookie name and path. Where would I
    "blank" the domain name?

    Thanks.


    "John Saunders" <> wrote in message
    news:...
    > "Philip Rayne" <> wrote in message
    > news:ccbmsp$gj4$1$...
    > > I am hosting a website on my home PC. I have a dynamic IP address so I

    > use
    > > a domain name that automatically gets updated with my IP address by my
    > > router. This domain name is something like rayne.mydns.org
    > >
    > > When I try and login to my home website via this domain name I have no
    > > problems with my form authentication. I get redirected to my

    default.aspx
    > > page.
    > >
    > > However, I have my own registered domain name (for example rayne.co.uk)
    > > which has been setup to forward to the rayne.homedns.org domain name.

    > When
    > > I access my site via this rayne.co.uk URL my login authentication does

    not
    > > appear to work. Has anyone any idea as to what might be going on?

    >
    > Forms Authentication uses cookies. Cookies are sent by the client browser

    to
    > the server. Each cookie is associated with a domain. The cookie will only

    be
    > sent to sites which match its domain.
    >
    > I suspect that you have a login cookie from rayne.mydns.org, and are

    trying
    > to use it on rayne.co.uk. This won't work, as the domains are different.
    >
    > You would have to set the cookie domain to the empty string in order for
    > this to work. That does mean that the cookie will be sent to every site,
    > however.
    > --
    > John Saunders
    > johnwsaundersiii at hotmail
    >
    >
     
    Philip Rayne, Jul 6, 2004
    #3
  4. "Philip Rayne" <> wrote in message
    news:ccdo2g$or5$1$...
    > Hi, I'm not to sure what you mean by this.
    >
    > I am using the forms authentication Form
    > FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, True) method
    > with the web.config specifiying my cookie name and path. Where would I
    > "blank" the domain name?


    <forms name=".ASPXAUTH" ... domain="" path="/" />
    --
    John Saunders
    johnwsaundersiii at hotmail
     
    John Saunders, Jul 6, 2004
    #4
    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. Li Zhang
    Replies:
    4
    Views:
    6,086
    softip
    Feb 27, 2009
  2. Dom
    Replies:
    0
    Views:
    468
  3. Dom
    Replies:
    0
    Views:
    513
  4. Max
    Replies:
    2
    Views:
    1,109
  5. kitchai yong via .NET 247

    authenticate win32 form client with form based authentication web services

    kitchai yong via .NET 247, May 13, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    230
    Jan Tielens
    May 13, 2004
Loading...

Share This Page