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 ? (Zatvorena) (Mono Support )

13022 put(a) pogledan, 4 odgovor(a) 12.4.2012. 20:33:20Kreirao(la) shawndg
shawndg

shawndg

12.4.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 ?
Ovaj sadržaj još nije ocijenjen. 
1871 Reputacija 252 Ukupno objava
cosmogonor

cosmogonor

13.4.2012. 6:09:09
Hi

use the following way

in your button click

FormsAuthentication.SignOut();

Response.Redirect(GetLoginUrl());

Ovaj sadržaj još nije ocijenjen. 
1176 Reputacija 140 Ukupno objava
khorvat

khorvat

13.4.2012. 6: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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
shawndg

shawndg

22.4.2012. 11:32:56
Works..

Thanks guys!
Ovaj sadržaj još nije ocijenjen. 
1871 Reputacija 252 Ukupno objava