Hi.
I have been trying to create a cookie container. But the cookie I have stored is not correct.
Below is the code:
request = CType(WebReques t.Create("..... "), httpWebRequest)
request.CookieC ontainer = New CookieContainer ()
myCookie = request.CookieC ontainer ' store the cookie as global variavble
.
.
.
'above request is a GET, after which I needed to POST
Dim request1 As HttpWebRequest
request1 = CType(WebReques t.Create("URL here is obtained from the response of the GET request previously"), HttpWebRequest)
request1.Cookie Container = myCookie
request1.Method = "POST"
GET is successful but POST failed. I have used a program to track my packets and realised that the GET and POST requests are treated together as 1 packet.
In addition, the cookie sent over by the POST request contains
Cookie: $Version=1; Aqu=lt=11903408 57; $Path=/; $Version=1; JJ=uuid-4ec51e83-bebd-4c94; $Path=/
This is rather weird as when I use normal IE to access the same website and login, the cookie I sent over will not contain "$Path=/; $Version=1".
In addition, for the POST request the response will be 403 forbidden. I suspect my cookies are wrong.
Can anyone advise on how I can remove "$Path=/; $Version=1" from the cookies?
By the way, does anyone know why GET and POST requests are treated as only 1 packet?
Many thanks.
1 1430 Plater 7,872
Recognized Expert Expert
By the way, does anyone know why GET and POST requests are treated as only 1 packet?
How many do you think they should be?
Packet size is dependant generally on the underlying socket and tcp control of the hardware and communication between endpoints. Having a lot of data in one packet just generally means you have a good connection. (in simple terms at elast, way more to it then that)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Geoff May |
last post by:
I'm busy rewriting by F1 database and I want to use cookies to store
various user definable views, (basically so that when the visitor
returns to a specific page, that page will redisplay in the format that
visitor saved). Problem is, I don't know if the cookie was accepted or not.
setcook() returns TRUE if it worked but that doesn't indicate whether or
not it was accepted.
I tried the following:
|
by: Manlio Perillo |
last post by:
Hi.
I'm using the Cookie module (on the client side).
I have found a problem trying to parse the cookie:
"Set-Cookie: value=thevalue; path=/;
expires=Fri, 21-May-2004 10:40:51 GMT"
The date is not parsed correctly, only "Fri," is matched.
|
by: Tony Archer |
last post by:
(Forgive the dupicate post, I had left out the OS Version out of the prior
post.)
Gentlemen, your urgent help is needed in solving a STRANGE problem.
I have two servers a dev box, and a production box. On the dev box
everything works fine, in production it hoses:
One of the things a user can do is click a "Change region" link which takes
them to a map of the world. They can then select one of four regions.
|
by: Ian |
last post by:
I have a problem I hope someone can point out where I am going wrong. I need
to store a date/time in a cookie ( ie the date a visitor last visited )
However the date format changes to US, despite LCID being set to UK. I have
googled extensively but can't work it out.
This is my code to give write the current date/time to screen:
<%
Session.LCID = 2057
Response.Write Now() & "<br>" &
|
by: odonel |
last post by:
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
here is my code:
HttpCookie cookie = Request.Cookies;
| |
by: adlaird |
last post by:
Hi,
I created a simple webform, put a test button on it and implemented a
click handler that looks like so:
private void btnTest_Click(object sender, System.EventArgs e)
{
HttpCookieCollection oCookReq =
HttpContext.Current.Request.Cookies;
HttpCookieCollection oCookResp =
|
by: Daniel Michaeloff |
last post by:
Hi all,
I have an application that when finished redirects to a non-ASP.NET app
which is choking on a huge ASP.NET session cookie. The cookie
"ASP.NET_SessionId" gets transmitted by the browser (IE6 in test case)
despite trying Microsoft's suggested method of expiring the cookie first.
I'd like to be able to kill the cookie and do a Response.Redirect() from
within a server-side button handler, but I'm to the point now where I'm...
|
by: Jerim79 |
last post by:
I did try to find the answer to this before posting, so this isn't a
knee jerk reaction.
What I am trying to accomplish is to have a script that opens a
cookie, reads a value, and then use a switch/case to take action based
on that value in the cookie. I want to set the cookie manually, so I
don't need setcookie(). I see that in PHP it stores the cookie in
memory. Is there a way to have PHP just read a cookie from the desktop
machine?...
|
by: Prisoner at War |
last post by:
Friends, your opinions and advice, please:
I have a very simple JavaScript image-swap which works on my end but
when uploaded to my host at http://buildit.sitesell.com/sunnyside.html
does not work.
To rule out all possible factors, I made up a dummy page for an
index.html to upload, along the lines of <html><head><title></title></
head><body></body></html>.; the image-swap itself is your basic <img
src="blah.png"...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |