Questions tagged [httpcookie]

A class in the System.Web namespace of the .NET framework which provides a type-safe way to create and manipulate individual HTTP cookies.

A class in the System.Web namespace of the .NET framework which provides a type-safe way to create and manipulate individual HTTP cookies.

409 questions
5
votes
3 answers

Set-Cookie not working properly in axios call

Explanation here, I sent one get req to ABC.com/Users/Login using Axios after this I sent a post request to ABC.com/Users/Login with form data and Cookie. but it does not work properly. It works properly in postmen My…
Kaushal Gajjar
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

AWS Lambda Set-Cookie header not setting in the browser

I'm trying to set a cookie in my aws lambda function response. I don't have any header mapping as I'm using lambda proxy integration with API Gateway. The response code looks like this in the lambda function: exports.handler = async (event) => { …
Brandon0050
  • 146
  • 1
  • 9
5
votes
1 answer

AWS CloudFront signed cookies + S3 works in REST client app, but not browser

I'm making this question as detailed as possible so that anyone else who runs into the same issues will have a comprehensive resource for figuring this out and getting it working. The Goal The goal is to use signed cookies so that an authenticated…
ffxsam
  • 26,428
  • 32
  • 94
  • 144
5
votes
2 answers

How to read multiple cookie with same name in webapi using C#

We have two cookies created with same name. When i am iterating through loop, i am always getting first cookie. Is there way to access both cookie separately? if (Request.Cookies.AllKeys.Where(x => x == "test").Count() > 1) { …
PANKAJ
  • 153
  • 1
  • 8
5
votes
1 answer

Why is Cookie available in Request immediately after setting using Response?

In pageload, if you do Response.Cookies.Add(..., immediately in the next line, you can access that cookie via Request.Cookies(... I know that under the covers, the cookie is added to Request.Cookies by .net, but the original request never had that…
Steve
  • 5,802
  • 12
  • 54
  • 76
4
votes
1 answer

ASP.NET MVC NuGet Glimpse Remove - Glimpse References Still Listed in HTTP_COOKIE

I played around with Glimpse in my ASP.NET MVC application, and have since decided to remove it for now. I originally installed it via NuGet and used NuGet to remove it. It appears everything is gone, except when I examine the cookie I still…
ben
  • 3,126
  • 3
  • 37
  • 51
4
votes
2 answers

Asp.net HttpCookie specify port

Is there a way to specify the port for a HttpCookie? I have a site that is available at sub.example.com and needs to be deployed at sub.example.com:81 and sub.example.com:82.(so the same domain, different ports -- using Apache2 and mono) The…
Alex Pacurar
  • 5,801
  • 4
  • 26
  • 33
4
votes
1 answer

How to correctly set cookies (HttpCookie) for ASP.NET Core

Below are a few different ways I'm trying to set cookies for a user. I don't understand why I'm getting an error on the HttpCookie. If someone knows what I'm doing wrong please let me know or if you need more details on my problem.
4
votes
0 answers

How to send cookie in Request header in office JS task pane app? (Office-js Add-in with angular 4)

Sending cookie in request header (Office-js Add-in with angular 4) headers.append('Content-Type', 'application/json'); headers.append('Accept', 'application/json'); headers.append('App-Url',…
4
votes
0 answers

WKWebView always unauthenticated on first load on simulator - then it's authenticated on all subsequent loads

In my app, I am loading a page that requires authentication in a WKWebView. On device, it is always authenticated on first load, because I have the proper cookies to authenticate it. However, if I "Erase All Content Settings" on the simulator (under…
4
votes
3 answers

Browser occasionally losing HttpCookie for authentication after postback and redirect

This has been a nagging issue for some time, but very sporadic and difficult to isolate. From time to time, browsers that have authenticated on a web application, have been open for a while, have logged in and out of the same web application…
Alex S.
  • 585
  • 3
  • 10
4
votes
1 answer

Getting error "the element 'httpCookies' has been locked in a higher level configuration"

I'm getting the error "The element 'httpCookies' has been locked in a higher level configuration" when i try to access an asp.net mvc 3 application. This happens when i add the line below inside my section.
StackTrace
  • 9,190
  • 36
  • 114
  • 202
4
votes
1 answer

How to make an ASP.NET session cookie expire with the ASP.NET HttpSession?

I have created an HttpCookie in order to share data across a subdomain : HttpCookie cookie = new HttpCookie("sessionGUID"); cookie.Value = value; cookie.Domain = ".example.com"; Response.Cookies.Set(cookie); I carelessly assumed since it is a…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
4
votes
3 answers

ASP.NET fails to correctly handle comma delimited cookies

According to the RFC, individual cookies in the "Cookie" HTTP header may be separated by commas as well as by semicolons. However, ASP.NET does not parse the commas case correctly - it does not count comma as a separator, but considers it just part…
Fyodor Soikin
  • 78,590
  • 9
  • 125
  • 172
4
votes
0 answers

Adding Cookie in asmx not working

I have a asmx webservice which has a webmethod that I'm calling it via jquery ajax and it returns a string, I want to read and edit cookies from this method, I know that I can read the cookie like…
arash moeen
  • 4,533
  • 9
  • 40
  • 85
1 2
3
27 28