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
0
votes
0 answers

I only seem to be able to set one Cookie - HttpCookie, asp.net

I have a system with a two-stage login. Stage one is a Company Login which identifies the Company using my system. Stage two is a Staff Login where a member of staff belonging to the above company logs in. In both stage an option is offered to save…
Jamie Hartnoll
  • 7,231
  • 13
  • 58
  • 97
0
votes
1 answer

Get HttpCookie property

I'm trying to convert the following line from VB to C#: HttpContext.Current.Request.Cookies("MyCookieName")("MyProperty") I can get the cookie: HttpCookie httpCookie = HttpContext.Current.Request.Cookies.Get("MyCookieName"); but don't know…
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139
0
votes
1 answer

Difference between Request.Cookies["Key"].Value and Request.Cookies["Key"].ToString()

Is there any difference in using the following Request.Cookies["Key"].Value and Request.Cookies["Key"].ToString()
शेखर
  • 17,412
  • 13
  • 61
  • 117
0
votes
0 answers

cookies set double quote for email params

I need to pass get params and stored those params in cookies. I have passed params like below localhost:3030/free-trial?firstName=hardik&lastName=patel&email=hrpatel%40test-info.com I have written code to set this on cookie But in Cookie It is set…
Hardik Patel
  • 937
  • 3
  • 14
  • 39
0
votes
2 answers

Cannot send 'PHPSESSID' via file_get_contents && stream_context_create

I am trying send a http request but I've noticed that when I am trying to send PHPSESSID as COOKIE I get the warning: file_get_contents('http://mysite.localhost'): failed to open stream: HTTP request failed Code: $options = array( 'http' =>…
dariush
  • 3,191
  • 3
  • 24
  • 43
0
votes
1 answer

jQuery cookie plugin creates same cookie instead of read it

I've this: // connect to MemberHub function connect() { // get unique id cookie var uid = $.cookie('UniqueID', { path: '/' }); member.server.connect(uid).done(function (result) { if (result.msg == 'success') { //…
Saber Amani
  • 6,409
  • 12
  • 53
  • 88
0
votes
1 answer

how can read a cookies file. In My system many cookies file alrady there

I am bit confused how can read a cookies file. I have try on google but have no proper solution. I have read this file but not success. ckps_ws_weather_deg cent www.bbc.co.uk/ 1600 4154368256 30363239 2133877056 30289814 * this file is downloading…
j.s.banger
  • 412
  • 1
  • 6
  • 15
0
votes
2 answers

I can't read cookies in master or other pages

I create some cookies in logon.aspx.cscodebehind thatc read and contain user info from DB with data reader . HttpCookie UID = new HttpCookie("ID"); Response.Cookies["UID"].Value = Recordset[0].ToString(); Response.Cookies.Add(UID); HttpCookie…
Hamid Talebi
  • 1,298
  • 2
  • 24
  • 42
0
votes
1 answer

IsAuthenticated is always false when including HttpCookie subkeys or not encrypting

Okay, I've been assigned with authenticating used on a login page. I've been working on this for quite a while and decided to clean up it up. The problem that I faced is one of those problems where exceptions aren't thrown, no error is generated,…
sksallaj
  • 3,872
  • 3
  • 37
  • 58
0
votes
1 answer

Simplemembership and cookie userdata compatibillity

I am trying to use SimpleMembershipProvider for FormsAuthentication. Now this provider internally creates a FormsAuth cookie without any additional userdata. I want to include some other information in the cookie such as UserId, Role, etc I have…
GeekzSG
  • 943
  • 1
  • 11
  • 28
0
votes
1 answer

Can I prevent instantiation of a certian type, except through a helper class? With Resharper or StyleCop perhapse?

After a security audit, I'm trying to enforce the creation of secure HttpCookies in our MVC app. I came up with a helper class to create them: public static class CookieHelper { /// /// Create Cookie. /// ///…
Levitikon
  • 7,749
  • 9
  • 56
  • 74
0
votes
0 answers

cannot delete cookies

I've a controller (on tomcat 7) from which I want to delete cookies. My domain is "test.mydomain.de" for example. Here is my code: private void removeCookies(HttpServletRequest request, HttpServletResponse response) { Cookie[] allCookies =…
volwei
  • 61
  • 3
0
votes
1 answer

Cookie encoding Base64

Cookies can be base64 encode. So if I capture pcap, does there any way, I can tell that cookie is base64 encoded? The rationale here is that, one cannot tell seeing the padding (=) sign, that it is base64 encoded, there cannot be any padding. Does…
Anant
  • 109
  • 1
  • 2
  • 5
0
votes
1 answer

C# MVC4 windows username and cookie issues

First, I'm sad to say I'm not sure whether this code should be in the _Layout.cshtml or somewhere in the controller. It needs to run on all pages, so I've put it in the _Layout.cshtml page. This is for an intranet web app. What I'm attempting to…
shubniggurath
  • 956
  • 1
  • 15
  • 31
0
votes
1 answer

Storing PHP Data in a Cookie

I want to store a database table in a cookie (for example, to store items in a shopping cart for a user that is not logged in). My problem is, say the table has a list of items where I need to store an ID and amount for each item. What is a good…
william007
  • 17,375
  • 25
  • 118
  • 194