[英]How to use HTTP response with custom authentication header
What I am trying to do is send http response to browser with my custom http header. 我想做的就是使用自定义的HTTP标头将HTTP响应发送到浏览器。 I expect browser to pass that custom http head back to web server every time it make request.
我希望浏览器每次发出请求时,都会将该自定义http头传递回Web服务器。 But it does not.
但事实并非如此。
I am using C# ASP.net MVC. 我正在使用C#ASP.net MVC。 When I return my custom ActionResult.
当我返回自定义ActionResult时。
public override void ExecuteResult(ControllerContext context)
{
base.ExecuteResult(context);
context.HttpContext.Response.AppendHeader("AuthenticationInfo", "1234567890");
}
我需要做的是将响应HTTP标头作为cookie。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.