473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

WinHttpRequest and cookies problem

Dan
Hello,

I have a simple ASP page that connects to another
server, requests a page, manipulate the results
and sends it to the client.
My problem starts when the remote server sets a
cookie with no path attribute and then redirect me
to another page. The redirection is done
automatically which is great for me but WinHttp
doesn't send the new cookie.
I discovered that WinHttp will only send that
cookie for the page it was set for. I thought no
path is like stating "path=/".
Is this expected from WinHttp and how can I solve
this problem?

Thank you
Dan
Jan 9 '07 #1
3 6866

"Dan" <no**@none.comwrote in message
news:eI****************@TK2MSFTNGP03.phx.gbl...
Hello,

I have a simple ASP page that connects to another
server, requests a page, manipulate the results
and sends it to the client.
My problem starts when the remote server sets a
cookie with no path attribute and then redirect me
to another page. The redirection is done
automatically which is great for me but WinHttp
doesn't send the new cookie.
I discovered that WinHttp will only send that
cookie for the page it was set for. I thought no
path is like stating "path=/".
Nope no path means the current page.
Is this expected from WinHttp and how can I solve
this problem?

Thank you
Dan


Jan 9 '07 #2
Dan
Thank you for your reply.
Nope no path means the current page.
Since it works differently for all browsers (they
do send the cookie), I suspect that it's a WinHttp
only "feature".
How can I solve my problem then? The remote site
expects to see this cookie
or it will not handle my request properly.
Does it mean that I have to manually add this
cookie to every request that follows the original
one?

Thank you
Jan 9 '07 #3

"Dan" <no**@none.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Thank you for your reply.
Nope no path means the current page.

Since it works differently for all browsers (they
do send the cookie), I suspect that it's a WinHttp
only "feature".
How can I solve my problem then? The remote site
expects to see this cookie
or it will not handle my request properly.
Does it mean that I have to manually add this
cookie to every request that follows the original
one?
That's about the size of it, yes. WinHTTP does not track cookies. The only
time it will repeat a cookie is on a redirect to the same domain.
>
Thank you


Jan 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Francis | last post by:
I have the following codes in an asp file. This page can receive the XML string send from client. ================================================== Dim objReceive Set objReceive =...
9
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
2
by: Netanel | last post by:
Hi, I have a site that I developed in ASP / VBScript. Some of the visitors are complaining that they can't get in into the system (using the login form of-course). My login form includes...
5
by: Miljana | last post by:
Hi, I have one problem with cookies in ASP.NET application. It seems that I can not retreive cookie from Request.Cookies collection. I put cookie in Response.Cookies collection, and after page...
6
by: Paul | last post by:
Here is a question that should get everyone going. I have an ecommerce site where I need to pass the order_id to every page. So which method is the best practice to pass this variable between...
0
by: Jerry T. | last post by:
I have the following code (using VB.NET 2003 with Framework 1.1): Protected Shared Sub RetrieveURLData() Dim HttpReq As WinHttp.WinHttpRequest Dim strText As String Try ' Create the...
6
by: fnoppie | last post by:
Hi, I am near to desperation as I have a million things to get a solution for my problem. I have to post a multipart message to a url that consists of a xml file and an binary file (pdf)....
0
by: Brian Pitt | last post by:
Hi I am trying to use WinHttp.WinHttpRequest.5.1 to access an https (ssl) page on an Oracle-Application-Server-10g and I keep getting a -2147483638 error. I am able to use the exact same script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.