SSOLogon from owin cookie middleware. The End() problem

This updates

Note how I add false to such as Response.Redirect(strRedirect, false); Otherwise, the SSOlogon page gets visited multiple times.

using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Cookies;
using System;
using System.Security.Claims;
using System.Web;
using System.Web.UI;

namespace WebApplication2
    public partial class _SSOLOGON : Page
        protected void Page_Load(object sender, EventArgs e)

                new AuthenticationProperties { IsPersistent = true },
                new ClaimsIdentity(new[] {
                                            new Claim(ClaimsIdentity.DefaultNameClaimType, "peter")

            var strRedirect = Request["ReturnUrl"];

            if (strRedirect == null)
                Response.Redirect("AccessDenied.aspx", false);

            Response.Redirect(strRedirect, false);


About home_pw

Computer Programmer who often does network administration with focus on security servers. Sometimes plays at slot machine programming.
This entry was posted in coding theory. Bookmark the permalink.