I tried to read a language cookie (which i set on the client) in an ApiController
in my backend Web API like this:
var cookieHeaderValue = Request.Headers.GetCookies("lang").FirstOrDefault();
and my request header looks like this:
also the line
Request.Headers.GetCookies();
returns an empty Collection... Can anybody tell my why and what i can do against it? Please help
The parsing of the CookieHeaderValue will fail because of the '?' in your authentication cookie name. Try to remove the questionmark.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With