<p>I have a main asp.net app, which is written in asp.net 1.1. Runnning underneath the application are several 2.0 apps. To completely logout a user can I just logout of the 1.1 app with FormsAuthentication.SignOut or is it more complicated than that?</p>

[{'answer_id': 55554, 'author': 'Gulzar Nazim', 'author_id': 4337, 'author_profile': 'https://Stackoverflow.com/users/4337', 'pm_score': 0, 'selected': False, 'text': '<p>It could be easier if you are having a central session store for all your applications. You can then set the session to null in one place.</p>\n'}, {'answer_id': 55575, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 4, 'selected': True, 'text': '<p>What you are looking to do is called Single Sign On and Single Sign Off.  There are differences based on how you have the applications set up.  I will try to clarify where those differences come into play.</p>\n\n<p>To implement single sign on and single sign off you need to make the cookie name, protection, and path attributes the same between all the applications.</p>\n\n<pre><code>&lt;authentication mode="Forms"&gt;\n    &lt;forms name=".cookiename"\n           loginUrl="~/Login.aspx" \n           timeout="30" \n           path="/" /&gt;\n&lt;/authentication&gt;\n</code></pre>\n\n<p>Next you need to add the machine keys and they need to be the same between all your applications.</p>\n\n<pre><code>&lt;machineKey validationKey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902"\n            encryptionKey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902F8D923AC"\n            validation="SHA1" /&gt;\n</code></pre>\n\n<p>Are you using second or third level domains for the applications?  If so you will need to do a little bit more by adding the domain to the cookie:</p>\n\n<pre><code>protected void Login(string userName, string password)\n{\n    System.Web.HttpCookie cookie = FormsAuthentication.GetAuthCookie(userName, False);\n    cookie.Domain = "domain1.com";\n    cookie.Expires = DateTime.Now.AddDays(30);\n    Response.AppendCookie(cookie);\n}\n</code></pre>\n\n<p>Now to do single sign off, calling FormsAuthentication.SignOut may not be enough.  The next best thing is to set the cookie expiration to a past date.  This will ensure that the cookie will not be used again for authentication.</p>\n\n<pre><code>protected void Logout(string userName)\n{\n    System.Web.HttpCookie cookie = FormsAuthentication.GetAuthCookie(userName, False);\n    cookie.Domain = "domain1.com";\n    cookie.Expires = DateTime.Now.AddDays(-1);\n    Response.AppendCookie(cookie);\n}\n</code></pre>\n\n<p>I am taking into consideration you are using the same database for all the applications.  If the applications use a separate database for registration and authentication, then we will need to do some more.  Just let me know if this is the case.  Otherwise this should work for you.</p>\n'}, {'answer_id': 2280558, 'author': 'Praveen', 'author_id': 269222, 'author_profile': 'https://Stackoverflow.com/users/269222', 'pm_score': 0, 'selected': False, 'text': "<p>This worked for me:</p>\n\n<p>In the Logout event, instead of FormsAuthentication.GetAuthCookie method use Cookies collection in Request object as below:</p>\n\n<pre><code>HttpCookie cookie = Request.Cookies.Get(otherSiteCookieName);\ncookie.Expires = DateTime.Now.AddDays(-1);\nHttpContext.Current.Response.Cookies.Add(cookie);\n</code></pre>\n\n<p>Ofcourse, this requires u know the Cookie name of the site(s) you want the user to be logged out - which however won't be a problem if you are using the same cookie across all the web apps.</p>\n"}, {'answer_id': 3150917, 'author': 'Daniel Steigerwald', 'author_id': 233902, 'author_profile': 'https://Stackoverflow.com/users/233902', 'pm_score': 0, 'selected': False, 'text': '<p>I prefer to use web.config</p>\n\n<pre><code>&lt;authentication mode="Forms"&gt;\n    &lt;forms domain=".tv.loc" loginUrl="~/signin" timeout="2880" name="auth" /&gt;\n&lt;/authentication&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/55503', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4888/']