Exemplo n.º 1
0
 public void ChunkingCookieManagerDeleteCookieApp(IAppBuilder app)
 {
     app.UseErrorPage(new ErrorPageOptions()
     {
         ShowExceptionDetails = true
     });
     app.Run(context =>
     {
         var cookieManager = new SystemWebChunkingCookieManager();
         cookieManager.DeleteCookie(context, context.Request.Headers["CookieName"], new CookieOptions());
         return(context.Response.WriteAsync("DeleteCookieApp"));
     });
 }
Exemplo n.º 2
0
 public void ChunkingCookieManagerEchoCookieApp(IAppBuilder app)
 {
     app.UseErrorPage(new ErrorPageOptions()
     {
         ShowExceptionDetails = true
     });
     app.Run(context =>
     {
         var cookieManager = new SystemWebChunkingCookieManager();
         var cookie        = cookieManager.GetRequestCookie(context, context.Request.Headers["CookieName"]);
         return(context.Response.WriteAsync(cookie ?? "null"));
     });
 }