I have been struggeling with a strange problem, if I may say so.

I have a controller in which I set a cookie, via this code:

```
var cookie = new HttpCookie("CookieName")
            {
                Value = Guid.NewGuid().ToString(),
                Expires = DateTime.Now.AddHours(12),
                Secure = false,
            };

            Response.Cookies.Add(cookie);

```

This cookie is being set correctly (I guess), because I see this cookie in my Chrome and also in FireFox in the console.

I also have a piece of code that checks whether or not the specific cookie is set:

```
    var token = Request.Cookies.Get("CookieName");
    if (token == null)
    {
       //Create a new cookie
    }

```

Also tried this: 

```
var token = Request.Cookies["CookieName"]?.Value;

```

But nothing, when I check with my debugger I see that the Request.Cookies contains nothing! I just don't understand this.

I use VS2015 Community and I have my project set up to be started via IIS10, developing on WIndows 10 Pro - 64-bits
I stopped using IIS Express because I thought the problem was being caused by the fact the url was like <http://localhost:2322>, I now work on a url which I let to 127.0.0.1 via my Host file on windows. domainA.local for example.

Added my web.config:

```
<compilation debug="true" targetFramework="4.6"/>
<httpRuntime targetFramework="4.5.1"/>
<httpCookies domain="" httpOnlyCookies="true"/>
<authentication mode="Forms">
  <forms loginUrl="~/Account/Login" timeout="2880"/>
</authentication>

```

Also tried this while authentication was commented

---

Update 26-02-2016:
I will try to explain my question in a different way.

I have a VS2015 project, an ASP.NET MVC C# application. This application should be listening to multiple URL's. Let's say it should listen to www.domainA.com and www.thisdomainiscool.com. Both domains are put in windows host file to 127.0.0.1. Because I run IIS on port 80 they both redirect to my project. 

In my code I check via Request.Cookies["cookieName"] if the cookie exists. I also check the Url in Request and see that it is one of the specified URL's. According to each url I load a different style. I check this by `httpContext.Request.Url.Host` BUT although the URL is given, the cookies are not. Anytime the cookies are empty but I see them in my console of Chrome, but not in Fiddler. How can I make this work? In Fiddler I only see localhost:54121. Do I need to assume that this is the correct address? If I navigate to this URL I get a 404.

I hope this explanation, makes a lot of sense, thanks in advance.