Form Authentication problem

P

Philip Rayne

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

John Saunders

Philip Rayne said:
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.
 
P

Philip Rayne

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.
 
J

John Saunders

Philip Rayne said:
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="/" />
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top