FormsAuthentication.CookieDomain Property
Q 1
The FormsAuthentication.CookieDomain property specifies the domain for which this cookie is valid. Overriding this property is useful if you want the cookie to be used for more applications on your web server.
A) I am assuming the quote suggests that if the same browser is used to log into two web applications, overriding this property will cause the two applications to put their tickets in the same validation cookie?
B) Does this mean that if we only have one Asp.Net application running on our web server then we don't need to overwrite the default (which is an empty string)?
But as far as I know, even if we only have one Asp.Net application running on our web server, we still need to set this property to a value representing our domain, or else form authentication won't work ?!
a source to share
Right. You don't need to override the value if you only have one application, but you also don't need to install it, it's designed for you.
Indeed, this goes for situations where you might have one app at http://www.example.com and another at http://host1.example.com - setting the cookie domain to example.com means they will use the same cookie.
a source to share