.Net Web API - GetCookie() returns empty collection

.net, asp.net, asp.net-web-api, web-services

Solution

The parsing of the CookieHeaderValue will fail because of the '?' in your authentication cookie name. Try to remove the questionmark.

Problem

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

Original source