-
-
Save javafun/ba0340d4cbbcba3e2397cf1d5a3e1990 to your computer and use it in GitHub Desktop.
Commerce Manager Logout with AspNet Identity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" | |
Codebehind="~/Overrides/Logout.aspx.cs" | |
Inherits="Web.Commerce.Overrides.Logout" %> | |
<%@ Import Namespace="Mediachase.Commerce.Shared" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" > | |
<head runat="server"> | |
<title>EPiServer Commerce Manager Logout Page</title> | |
<style type="text/css"> | |
table.login | |
{ | |
border-style: none; | |
border-width: 0; | |
width: 100%; | |
} | |
table.login td | |
{ | |
padding-top: 1px; | |
padding-bottom: 1px; | |
} | |
</style> | |
<link href="<%# CommerceHelper.GetAbsolutePath("~/Apps/Shell/styles/css/FontStyle.css") %>" type="text/css" rel="stylesheet" /> | |
<link href="<%# CommerceHelper.GetAbsolutePath("~/Apps/Shell/styles/css/FormStyle.css") %>" type="text/css" rel="stylesheet" /> | |
<link href="<%# CommerceHelper.GetAbsolutePath("~/Apps/Shell/styles/css/GeneralStyle.css") %>" type="text/css" rel="stylesheet" /> | |
<link href="<%# CommerceHelper.GetAbsolutePath("~/Apps/Shell/styles/LoginStyle.css") %>" type="text/css" rel="stylesheet" /> | |
<link href="<%# CommerceHelper.GetAbsolutePath("~/Apps/Shell/styles/css/BusinessFoundation/Theme.css") %>" type="text/css" rel="stylesheet" /> | |
<!-- EPi Style START --> | |
<link href="<%# CommerceHelper.GetAbsolutePath("~/Apps/Shell/EPi/Shell/Light/Shell-ext.css") %>" rel="stylesheet" type="text/css" /> | |
<!-- EPi Style END --> | |
</head> | |
<body> | |
<form id="form1" runat="server" autocomplete="off"> | |
<div id="epi-ecf-banner"> | |
<div style="float:left;width:350px;padding:5px;"> | |
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/"><img alt="EPiServer Commerce" align="absmiddle" src="../EPi/Shell/Light/Resources/EPiServer_ECF-NEG.png" width="300" height="40" /></asp:HyperLink></div> | |
</div> | |
<div class="LoginPanel"> | |
<div class="LoginTable"> | |
<table cellspacing="0" cellpadding="0" align="left"> | |
<tr> | |
<td> | |
<h1>Logout</h1> | |
</td> | |
</tr> | |
<tr> | |
<td class="text" width="90%"> | |
<br /> | |
You have been successfully logged out from EPiServer Commerce. | |
<br /> | |
Close the browser to end your session. | |
<br /> | |
<br /> | |
</td> | |
</tr> | |
<tr valign="top"> | |
<td width="550"> | |
| |
</td> | |
</tr> | |
</table> | |
</div> | |
</div> | |
<div class="LoginFooter"> | |
<asp:HyperLink Target="_blank" runat="server" NavigateUrl="http://www.episerver.com"><%=Mediachase.Commerce.FrameworkContext.ProductName%></asp:HyperLink> | |
<br /> | |
Version: | |
<%=Mediachase.Commerce.FrameworkContext.ProductVersionDesc%><br /><br /> | |
© <%=DateTime.Now.Year.ToString()%> EPiServer AB. All Rights Reserved. | |
</div> | |
</form> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.Cms.UI.AspNetIdentity; | |
using Microsoft.AspNet.Identity.Owin; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
namespace Web.Commerce.Overrides | |
{ | |
public partial class Logout : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
Page.Header.DataBind(); | |
Request.GetOwinContext().Get<ApplicationSignInManager<ApplicationUser>>().SignOut(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by a tool. | |
// | |
// Changes to this file may cause incorrect behavior and will be lost if | |
// the code is regenerated. | |
// </auto-generated> | |
//------------------------------------------------------------------------------ | |
namespace Web.Commerce.Overrides | |
{ | |
public partial class Logout | |
{ | |
/// <summary> | |
/// form1 control. | |
/// </summary> | |
/// <remarks> | |
/// Auto-generated field. | |
/// To modify move field declaration from designer file to code-behind file. | |
/// </remarks> | |
protected global::System.Web.UI.HtmlControls.HtmlForm form1; | |
/// <summary> | |
/// HyperLink1 control. | |
/// </summary> | |
/// <remarks> | |
/// Auto-generated field. | |
/// To modify move field declaration from designer file to code-behind file. | |
/// </remarks> | |
protected global::System.Web.UI.WebControls.HyperLink HyperLink1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment