internal void CookieManagerDeleteCookieApp(IAppBuilder app) { app.UseErrorPage(new ErrorPageOptions() { ShowExceptionDetails = true }); app.Run(context => { var cookieManager = new SystemWebCookieManager(); cookieManager.DeleteCookie(context, context.Request.Headers["CookieName"], new CookieOptions()); return(context.Response.WriteAsync("DeleteCookieApp")); }); }
internal void CookieManagerEchoCookieApp(IAppBuilder app) { app.UseErrorPage(new ErrorPageOptions() { ShowExceptionDetails = true }); app.Run(context => { var cookieManager = new SystemWebCookieManager(); var cookie = cookieManager.GetRequestCookie(context, context.Request.Headers["CookieName"]); return(context.Response.WriteAsync(cookie ?? "null")); }); }