Please ignore some of the weird styles, doing a big HTML5 upgrade, and it's not quite done yet.

Daniel's Blog

The ramblings of a 22 year old guy.

Sign Out of BlogEngine.Net

As much as I love BlogEngine.net, one thing annoyed me, you can't sign out, which is useful when you want to check that your post has published correctly (And because the admin menu is huge) - So I created a quick fix for it

Step 1:

Create a page called Signout.aspx in your Admin/Pages directory and add the following code to the Page_Load event

FormsAuthentication.SignOut();
Session.Abandon();
Response.Redirect("../../");

Step 2:

Add the following line to your Web.sitemap file

<siteMapNode url="~/admin/Pages/Signout.aspx" title="Log out"  description=""  roles="administrators, editors"/>

Done! You should now see a Logout link in your admin menu

Post a comment
Comments
I have seen that this logout is available in version 1.4. In the top-menu. Another option is opening 2 different browsers. For example: IE and FireFox.
Turns out I must be blind, there is! Must be new though cause I swear it wasn't in 1.3 (The last version I used). Must say, that is rather embarrassing.
...Then again though, I hardly ever go in to the admin panel because I use Live Writer to write posts, meaning that I just get the admin panel in the sidebar where there is no logout link. Personal preferene I guess
Sign Out of BlogEngine.Net was really useful. By the way, thanks for this information.
same actually what happen to me last time