Mono 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.

Mono Support Programmicaly Log out of MonoX ? (Closed)

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

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
2

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. 
1141 Reputation 138 Total posts
khorvat
3

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. 
11551 Reputation 1644 Total posts
shawndg
4

shawndg 4/22/2012 11:32:56 AM

Works..

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