Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What´s the problem?

Status
Not open for further replies.

marcela24

Programmer
Feb 17, 2003
72
NL
Iam trying to pass a cookie to another weg page, so iam doing this:

'First iam creating the object responsible for that
Set objXml = Server.CreateObject("Microsoft.XMLHTTP")
'Then iam storing all the header in a variable named cookie
cookie = objXml.getAllResponseHeaders ()
'Iam printing it just to test
response.Write(cookie)
response.End()

'Finally ill pass it to a weg page
objXml.Open "GET", " False
objXml.setRequestHeader "Set-cookie", cookie
objXml.Send

THE PROBLEM IS THAT AT THE FIRST TIME I DID THAT IT WORKS WELL AND THE RESPONSE.WRITE COMMAND HAS PRINTED ALL THE HEADER INCLUDING THE COOKIE VALUE. BUT AFTER THET, MY NEXT TRY DIDN´T WORK FINE, THE HEADER WAS PRINTED WITHOUT THE COOKIE VALUE.

Does anybody know what´s the problem?
 
I've always use the request.cookie object to read and the response.cookie to write. What do you need that's different?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
I think that´s used when an user is acessing my page and i get him cookie. The problem here is that iam trying to access another paga from my page and get its cookie and set it later.

I think that´s the difference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top