ASP.NET Mvc Api: Set cookie then 302/303 Redirect loses the cookie

前端 未结 2 1853
既然无缘
既然无缘 2021-01-17 15:40

I have an API action that returns a HttpResponseMessage. API address is like: http://localhost/login?authcode=xxx

The API action does some login authentication and r

2条回答
  •  臣服心动
    2021-01-17 16:33

    My cookies have added Path, but the problem still not resolve.

    After a long time, I finally resolve this problem by remove session state config in web.config:

    
    
      
        
      
    
    

    I can add set-cookie header after comments .

    I hope this helps you, thanks.

提交回复
热议问题