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 12891 time(s), 4 post(s) 12.04.2012 20:33:20by shawndg
shawndg

shawndg

12.04.2012 20:33:49
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 ?
Dieser Inhalt wurde noch nicht bewertet. 
1871 Reputation 252 Total posts
cosmogonor

cosmogonor

13.04.2012 06:09:09
Hi

use the following way

in your button click

FormsAuthentication.SignOut();

Response.Redirect(GetLoginUrl());

Dieser Inhalt wurde noch nicht bewertet. 
1176 Reputation 140 Total posts
khorvat

khorvat

13.04.2012 06:36:01
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
Dieser Inhalt wurde noch nicht bewertet. 
15993 Reputation 2214 Total posts
shawndg

shawndg

22.04.2012 11:32:56
Works..

Thanks guys!
Dieser Inhalt wurde noch nicht bewertet. 
1871 Reputation 252 Total posts