Skip to content

Instantly share code, notes, and snippets.

@bjorn-ali-goransson
Created June 16, 2017 12:14
Show Gist options
  • Save bjorn-ali-goransson/a4fd6fda7109f5aac60eac7ce90cd32d to your computer and use it in GitHub Desktop.
Save bjorn-ali-goransson/a4fd6fda7109f5aac60eac7ce90cd32d to your computer and use it in GitHub Desktop.
This file can help by debugging "user cannot log in" problems when in EPiServer the user is just redirected back to the login page when logging in. Probably you are authenticated but not authorized.
<%@ Page Language="C#" %>
<script runat="server">
protected override void OnInit(EventArgs e){
Response.Write(User.Identity.Name);
Response.Write("<br>");
foreach(var role in System.Web.Security.Roles.GetRolesForUser()){
Response.Write(role);
Response.Write("<br>");
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment