MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Programmicaly Log out of MonoX ? (Closed) (Mono Support )

Viewed 12192 time(s), 4 post(s) 4/12/2012 8:33:20 PMby shawndg
shawndg

shawndg

4/12/2012 8:33:49 PM
Hi,

I have a little control I created that does its own menu and stuff instead of the MonoX one but I cant figure out how to make it logout of MonoX.

Is there some api or something that I can use to log out ?
This content has not been rated yet. 
1871 Reputation 252 Total posts
cosmogonor

cosmogonor

4/13/2012 6:09:09 AM
Hi

use the following way

in your button click

FormsAuthentication.SignOut();

Response.Redirect(GetLoginUrl());

This content has not been rated yet. 
1176 Reputation 140 Total posts
khorvat

khorvat

4/13/2012 6:36:01 AM
Hi,

in addition what Ramaraor suggested you may want to abandon the user session by using code similar to this:
FormsAuthentication.SignOut();
base.Page.Response.Clear();
this.Page.Response.StatusCode = 200;
HttpContext.Current.Session.Abandon();
Response.Redirect(URL);

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
shawndg

shawndg

4/22/2012 11:32:56 AM
Works..

Thanks guys!
This content has not been rated yet. 
1871 Reputation 252 Total posts