Signout in SPClaimsUtility

We created two sites, one with FBA and other one is Windows
authentication. Code base remain same for both sites, only authentication will get differ. Each site has different signout page and authentication pages. FBA authentication has been implemented using
SPClaimsUtility.AuthenticateFormsUser method.
In FBA, Logged in User has to redirect to login page after one of our customized validation. For that, I've implemented the following code, but I'm getting an Access Denied error saying that singed user still logged in. It seems logged in user didn't logging
out yet.
FormsAuthentication.SignOut();
if (HttpContext.Current.Session != null) HttpContext.Current.Session.Abandon();
// clear authentication cookie
HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, "");
cookie1.Expires = DateTime.Now.AddYears(-1);
cookie1.Path = FormsAuthentication.FormsCookiePath;
HttpContext.Current.Response.Cookies.Add(cookie1);
// clear session cookie (not necessary for your current problem but i would recommend you do it anyway)
HttpCookie cookie2 = new HttpCookie("ASP.NET_SessionId", "");
cookie2.Expires = DateTime.Now.AddYears(-1);
HttpContext.Current.Response.Cookies.Add(cookie2);
FormsAuthentication.RedirectToLoginPage();
And I tried by adding below line in above said code after removing FormsAuthentication.SignOut()
line alone. Now, I redirected to login page, but when I'm logged in with the same user getting an error saying that the user which I logged in now it's already logging in. It seems logged in user didn't logging out yet.
FederatedAuthentication.SessionAuthenticationModule.SignOut();
Could you please assist me how signout needs to be implemented for the FBA authentication implemented using
SPClaimsUtility.AuthenticateFormsUser method.

Hi Ajit,
See this similar thread (with answers):
https://social.technet.microsoft.com/Forums/en-US/5bf1dfdf-cc1c-422c-9c25-094fc7aaad61/user-details-retained-if-user-does-not-signout-and-closes-the-browser-and-opens-page-again?forum=sharepointgeneralprevious
Nico Martens
SharePoint/Office365/Azure Consultant

Similar Messages

  • I changed my email address for my apple id but icloud still has old email adress and when I try to signout so I can sign in with new address it asks for password and then says invalid so I cannot delete the account to sign in with the new one! Please help

    I changed my email address for my apple id but icloud still has old email adress and when I try to signout so I can sign in with new address it asks for password and then says invalid so I cannot delete the account to sign in with the new one! Please help

    OK...now I appear to 'progressed' I changed my email address back to original on Apple id and then was able to delete icloud account. Apparently I couldnt do it as it kept requesting password  when I entered passsword ( both old and new one, it wouldnt accept it as it had my old email address in ) It didnt do that on ios6 . Anyway I deleted account, but now I tried to login in with my new id/password and it says unable as already in use!!! More help needed please! Its a nightmare!!

  • Basic Authentication and Signout

    Hi All
     I am trying to isolate a problem where signout doesn;t display signout page in browser and again logs in user to site in browser.
    I have Basic authentication enabled and  default domain is set.
    when I use WIndows auth NTLMS signout page works fine.

    Did you close the browser in between log out/log in to destroy the cookie?
    Trevor Seward, MCC
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • If i open same url in same browser without making signout in SharePoint FBA site, it login user again automatically which should not happened

    Hi All.
    I have SharePoint 2010 FBA site, and when user close there browser without logout button and if they enter same url in browser then it allow user to login on application which is security risk.
    So can you please help me to solve this problem.
    Thanks
    Ajit Shinde

    Hi Ajit,
    See this similar thread (with answers):
    https://social.technet.microsoft.com/Forums/en-US/5bf1dfdf-cc1c-422c-9c25-094fc7aaad61/user-details-retained-if-user-does-not-signout-and-closes-the-browser-and-opens-page-again?forum=sharepointgeneralprevious
    Nico Martens
    SharePoint/Office365/Azure Consultant

  • Mos_osso signout on mobile device

    Hi,
    I have a mobile application that is protected through mod_osso. On PC browser, signout from application by setting response.sendError(470, "Oracle SSO"); works, but on mobile device, the user is still able to access application after signing out.
    Tried invalidating users session on logout, but to no avail.

    Hi,
    My requirement is to be able to interact wth the navigation of service items on ptg/rm. I have found that I can do this using the PAservicepath url parameter, but is it possible to pass parameters through to my application as well ?
    eg.
    I have the following scenario :
    Folder -> Service -> MyApp
    Using the following url : /ptg/rm?PAservicepath=/Folder/Service/MyApp&<additional parameter for myapp>
    How do I pass my additional parameters through to my application ?

  • Problem changing signout page in SquirrelMail

    As root, I used conf.pl (option 1 and then option 5) to change signout page (to some other page), saved it. I noticed the change in config.php. But when the user clicks on Sign Out, it is still usign the normal signout.php page. This does not happen in other linux distributions. Is there any other change to be made on Mac ?

    I haven't tried changing the sign-out page before....
    But if for some reason it doesn't work, you could always setup a redirect for /signout.php to the destination you choose.
    Jeff

  • ADFS signout Failing with error.

    Hi,
    while sign-out from application. it is throwing error massage.
    An error occurred         
                An error occurred. Contact your administrator for more information.         
    Error
    details
    Activity ID: 00000000-0000-0000-4f5a-008000000091
    Error time: Thu, 30 Apr 2015 13:22:53 GMT
    Cookie: enabled
    User agent string: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Zune 4.7; InfoPath.3)
    I have configured three RPs trusts like this.
    https://tesdev.contoso.com/
    https://testdev.contoso.com/app1
    https://testdev.contoso.com/app2
     from home page https://tesdev.contoso.com/ , when I click signout ADFS throws the error.
    How would I Correct this error ?
    Regards,
    Saswati

    THe network access account is needed for accessing network resources during the task sequence or software distribution.  During OSD, there may not be a computer account yet for the system to use to access the content.  You need to set the NAA.
    http://technet.microsoft.com/en-us/library/hh427337.aspx
    Jeff

  • Anyone know how to signout from a Mac?

    The instructions when I search for help on this say Open an Application, click help then select signout. I think this is only applicable to windows, using a mac the signout option is not available here. I have tried various searches and also checked Preferences and Services but cannot find anyway to signout (deactivate) adobe on my laptop.

    From the application's Help menu choose Sign Out.

  • My friend itune account has been hack by someone . so he don't have password or security questions answers.So he want to delete his itune account because he can't signout his icloud account on his iphone.somebody help us!!

    My friend itune account has been hacked by someone.And he change every things like password,security questions and recovery mail.So my friend don't have password or security questions answers.And he want to delete his itune account because he can't signout his icloud account on his iphone.Please tell me how to turn off find my iphone without password.
    somebody help us!!
    sorry for my some mistake in descussion because i am bad in english.

    Welcome to the Apple community moonlight94.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact AppleCare (or Apple ID Support), upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • When using firefox I cannot signin to sites, but can get to sites with tabs on toolbar but cannot signout when I siginin, I have uninstalled the program and reinstalled it but still have the same problem?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/891666]]</blockquote>
    When using Firefox I cannot signin to sites, but can get to sites with tabs on toolbar but cannot signout whe signin, I have uninstalled the program and reinstalled it but still have the same problem.

    That problem can be caused by the Yahoo! Toolbar that extents too much downwards and covers the top part of the browser window and thus makes links in that part of the screen not clickable.
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    You can keep an eye on this thread:
    *[[/forums/contributors/707748]]

  • "You must close your browser to complete the signout process" - Mandatory?

      I notice when a users clicks sign out they get a message "You must close your browser to complete the signout process."    Is this required or can one change this behavior?  I see this as rude, as someone who has lots
    of tabs open in IE will be forced to close the entire IE session and lose their tabs.
    spnewbie

    Depending on your browser and setting this may be necessary to close the browser. SharePoint is not being rude, its just trying to protect you.
    Read the following thread. Andres has provided good explanation for why this is required.
    http://sharepoint.stackexchange.com/questions/3344/you-must-close-your-browser-to-complete-the-sign-out-process
    Amit

  • Log out/signout button?

    Where is the signout button on the Sync page [Go to Options > Sync]

    See:
    * Tools > Options > Sync > Unlink This Device

  • Can't signout of icloud.

    I wanted to make some changes to my icloud account On my Macbook  I wanted to prevent the saving of certain information (e.g. Contacts) to the Cloud.  After unchecking a few boxes, I tried to signout.  A series of warning messages appeared.  For example, it says it would delete Contacts from icloud and my Macbook.  It threatened to delete a number of things from my Macbook.  It also wanted to disable the Find My Mac feature.  I didn't request any deletions from my Macbook.  I don't want to disable the Find My Mac feature.  It wouldn't let me signout unless I agreed to these changes.  I was caught in a loop.  This is very strange.  Any help please.

    Disconnecting your Mac from iCloud (signing the Mac out of iCloud) means doing without iCloud-dependent things while you are signed out. For example, Find My Mac is based on your iCloud account ID; only somebody with the credentials to sign on your iCloud account (and now members of the same Family Share group) are entitled to know where that Mac is, so Find My Mac is useless for a particular Mac unless some iCloud account is signed onto that Mac.

  • Help need for force to signout All session ! how...

    hi
         help need for force to  signout All session !  how ??
    Solved!
    Go to Solution.

    Hi and welcome to the Skype Community,
    To force a signout of all instances your Skype is signed into please change your password: https://support.skype.com/en/faq/FA95/how-do-i-change-my-password
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • I purchased new ipad air, i had installed gmail app, i couldn't found signout option

         I purchased new ipad air, i had installed gmail app from app store, i couldn't found signout option in my gmail app please help me

    Google make the Gmail app, not Apple - so the answer is on the Google Support forum here: https://support.google.com/mail/answer/3114694?hl=en

Maybe you are looking for