Form Authentication problem

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?

Advertisements

"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

Advertisements

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" <> 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?

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!