tags:

views:

11

answers:

0

I need your help for a problem I encountered recently while using myopenid.com. I have a simple sample relying part website with 2 pages, default.aspx and OpenidLogin.aspx. Default.aspx page check a session variable and see that user is not logged in and hence redirect to OpenidLogin.aspx page. OpenidLogin.aspx page contains a OpenidLogin ASP.NET control from dotnetopenauth.com, which takes the user through myopenid.com login process and then my Default.aspx page gets displayed after successful authentication.

Now, I like to add a sign out feature on my Default.aspx page. I don't mind adding a small ASP.NET button and the user gets signed out when he click on the button. However, I'm trying to see what should I do to Log the user out? I read in one of the forums that OpenidLogin control doesn't keep any information about the logged in user. But when Iremained in the same page and log in back using the OpenidLogin control and using different user name, I see that the previous user still logged on.

I tried to do the following in the handler function for the Signout button but it didn't work.

        Session["sessionUserEmail"] = null;
        Response.Cookies.Clear();
        Session.Abandon();
        Session.RemoveAll();
        Session.Clear();
        DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingPartyControlBase.LogOff();
        Response.Redirect("~/");

Please help me.

Thanks Patil,Ravikumar