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
10
votes
2 answers

AWS Application Load Balancer : Request Header Or Cookie Too Large

AWS's new Application Load Balancer is throwing an error : 400 Bad Request, Request Header Or Cookie Too Large, awselb/2.0 How do i increase the size in aws-elb. It was working fine with the classic load balancer.
Kechit Goyal
  • 3,952
  • 3
  • 20
  • 21
10
votes
2 answers

Exception calling Add. Part of cookie is invalid

I am using the Add method of System.Net.CookieContainer. It has worked well over the years but suddenly I am getting: Exception calling "Add" with "2" argument(s): "The 'Value'='321,386,%2F%3Fa%3D1,http%3A%2F%2Fwww.xxxx.com%2Fpremium%2Fmoney' …
Old Geezer
  • 14,854
  • 31
  • 111
  • 198
10
votes
7 answers

CookieManager for multiple threads

I am trying to make multiple connections via threads. But every connection seems to override the other's cookies, resulting in the connections using the wrong cookies. inside the threaded class's constructor: manager = new CookieManager(); …
Wurstbro
  • 974
  • 1
  • 9
  • 21
8
votes
1 answer

How do I destroy an http-only cookie while a server is offline?

I have a web application that talks to a web-server via REST, this web application could be running on a public computer and enables multiple users to logon and logout in a given time period. All cookies are HTTP-only, this is simply an additional…
Josh Mc
  • 9,911
  • 8
  • 53
  • 66
8
votes
1 answer

Accessing a cookie created on one subdomain on another subdomain

Given: Domain 1: subdomain1.mydomain.com Domain 2: subdomain2.mydomain.com I create a cookie on "Domain 1" using the code below and trying to access the cookie on "Domain 2". My problem is that "Domain 2" does not want to recognize the cookie. What…
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
7
votes
1 answer

Nginx If cookie exist different location

I have a nginx config file which is using prerender service , I want to check if a cookie names access_token exist then serve local angular , and if cookie is not exist (user is not logged in ) then proxy pass request to prerender service , and here…
Majid Abdolhosseini
  • 2,191
  • 4
  • 31
  • 59
7
votes
1 answer

How to generate a cookie and send it in a request in Jmeter

I am fairly new to Jmeter and hence having trouble figuring out the following: I am testing a web service that needs a valid cookie to be sent in header. I have an endpoint url against which the userid and password validates. How do I validate the…
sahana
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

When a cookie is sent via http header to a browser will it be added to the client browser?

I am trying to make connection with an API. When I call a method to this API, it respond with a cookie value sent via HTTP headers. Will this header be automatically added to the client "my browser?" or do I have to parse the request first and…
Jaylen
  • 39,043
  • 40
  • 128
  • 221
7
votes
1 answer

Create non-persistent cookie with FormsAuthenticationTicket

I'm having trouble creating a non-persistent cookie using the FormsAuthenticationTicket. I want to store userdata in the ticket, so i can't use FormsAuthentication.SetAuthCookie() or FormsAuthentication.GetAuthCookie() methods. Because of this I…
Marcus
  • 2,470
  • 1
  • 22
  • 29
6
votes
1 answer

Is it possible to set a cookie during a redirect in ASP.NET?

I am using ASP.NET. I either add or set a cookie (depending on whether the HttpRequest contains a cookie with specified key), and immediately afterward call Response.Redirect. The cookie is not set. Is this correct behavior? Is there something…
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
6
votes
6 answers

How to create a non-persistent (in memory) http cookie in C#?

I want my cookie to disappear when the user closes their brower-- I've already set some promising looking properties, but my cookies pop back to live even after closing the entire browser. HttpCookie cookie = new HttpCookie("mycookie",…
MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
6
votes
2 answers

How do I get cookies to to be sent with my requests to the backend in ember app?

Is there a way in Ember to send cookies with the requests to the backend? For example: if my client URL is protocol://example.com. The cookies that belong to the same domain will be in the request header when I navigate to…
user3476766
  • 739
  • 6
  • 6
6
votes
1 answer

Persistent cookie expiry set to Session in asp.net mvc?

I am using ASP.NET MVC and want to be able to automatically log somebody in when they return to the site (in exactly same way that this site does). When a user first registers or logs in I set the cookie as follows: FormsAuthenticationTicket ticket…
Alex P
  • 12,249
  • 5
  • 51
  • 70
5
votes
1 answer

cookie problems in asp.net. Values reverting after response.redirect

I have spent sooooo many hours on this it is insane. I have a page base class which contains a "setcookie" function and this is basically this: Dim context As HttpContext = System.Web.HttpContext.Current If…
TheMook
  • 1,531
  • 4
  • 20
  • 58
5
votes
2 answers

FormsAuthentication with enabled slidingExpiration is not returning a cookie in each request.

I have a web application with FormsAuthentication and with slidingExpiration="true" in my web.config is not returning a cookie in each request, but when I see the HTTP transactions, I cannot see the webserver returning the AUTH cookie in each…
vtortola
  • 34,709
  • 29
  • 161
  • 263
1
2
3
27 28