﻿# More Passport Woes...

<datetime class="hidden">2004-01-25T00:00</datetime>
<!-- category -- mostlylucidcouk, Imported, ASP.NET, Security -->

Sorry I haven't posted for the last day and a bit...we've been getting RC3 of our
Portal project ready for delivery. The Portal is able to support two authentication
mechanisms, Passport and Forms. Forms has worked perfectly from day one but the Passport
has been a real bugger. The Passport SDK says that to sign out you do this:::

&lt;%@ Page Language="C#"%&gt;

&lt;%@ Import Namespace="System.Web.Security"%&gt;

&lt;%

Response.ContentType="image/gif";

Response.Expires=1;

Response.Cookies("MSPProf").Value = "";

Response.Cookies("MSPProf").Expires = DateTime.MinValue;

Response.Cookies("MSPAuth").Value = "";

Response.Cookies("MSPAuth").Expires = DateTime.MinValue;

Response.AppendHeader("P3P", "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"");

**PassportIdentity.SignOut("images/signout\_good.gif")**;

%&gt;

So, fair enough, I implemented this (with an additional line or two to clear my own
roles cookie) - result, nothing! Passport signed out but the cookies were not cleared.
So, after about 7 hours of trying various things, I decided to move the Response.Cookies
lines after the call to the PassportIdentity.Signout method - this worked. My only
guess is that, for some reason, the Signout does a Response.Cookies.Clear() as part
of its' process. A most frustrating day!