SignOut() doesnt work??

Posted on 2011-10-06
Medium Priority
Last Modified: 2012-05-12
Hi all,

At the logoff page from our website i do following:

But the user isnt Signed out at all,
when i read the membership.GetUser ill get the providerkey back of the person who is trying to logoff  (Response.Write(Membership.GetUser().ProviderUserKey.ToString()))

Am i missing something??

Question by:paulley
  • 3
  • 3
LVL 14

Expert Comment

ID: 36923161
I don't know so much from experience, but this may help you out: http://stackoverflow.com/questions/412300/formsauthentication-signout-does-not-log-the-user-out

Author Comment

ID: 36923203
@quizwedge: tried that one already without success :(

must say: I'm using cross-side logins
Im loggin on at domainA.mysite.com than i move to account.mysite.com, at this point im loggin off
the return url is presented (domainA.mysite.com/login.aspx) and at that point of time the Membership.GetUser() is returning te currently logged off user
LVL 14

Expert Comment

ID: 36923237
Are you trying to log off of domainA.mysite.com from account.mysite.com? I don't have an answer, at least yet, for that, but just trying to clarify for anyone else that comes across this question.
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Author Comment

ID: 36923333
Thank you,

Yes, im sharing the login session betweeen both sites, therefor ive enabled crosssite login in the web.config.

So it can be possible that a user Logs in on the domainA site, moves to the account.mysite.com part, does his accounting thing, and logs off in that site.

Hope this is clear :D
LVL 14

Accepted Solution

quizwedge earned 1500 total points
ID: 36923389
About to head to bed, but wanted to throw out one more suggestion. Since you're doing cross-site stuff anyway, what about a page at domaina.mysite.com that you can call from account.mysite.com? Basically, ignore the advice in this article so that you can do cross-site requests: http://www.codinghorror.com/blog/2008/09/cross-site-request-forgeries-and-you.html

Would reducing the ticket lifetime help? It still wouldn't be an immediate logout, but you could set it to 1 minute. http://msdn.microsoft.com/en-us/library/ff648341.aspx

Finally, there are some suggestions at http://stackoverflow.com/questions/612488/logoff-button-iis6-asp-net-basic-authentication for which I'm currently too tired to figure out if they apply or not. They might, so I'm including them. :)

Author Closing Comment

ID: 37090204
Problem still exist. looking for workaround.
Thanx for the replies

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, 1 hour left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question