login about faq

I've been trying to accomplish this with MSXML2.ServerXMLHTTP, but this seems impossible. I really need to preserve the current session between my current ASP script and the page that I'm trying to load.

Is there any way to do this with the Chilkat HTTP Request object? Can I add the cookie header to make it work? Or is there another way?

asked Mar 31 '14 at 10:09

FuRaz's gravatar image


There are many possible ways to do it with Chilkat HTTP. In general, the HTTP protocol is stateless (I'm sure everyone knows this) and to maintain a session requires a persistent piece of information that identifies the session,and is sent with each HTTP request belonging to the session.

This can be accomplished with cookies. It can also be accomplished with ad-hoc session ID's in a request header field, or as a request parameter (such as URL-encoded within the URL for GET's or within the request body for POSTs/Puts/etc.

There is no single answer -- it really depends on how you wish to design your session handling within your application.


answered Mar 31 '14 at 14:28

chilkat's gravatar image

chilkat ♦♦

Thanks for your reply!

The thing is, I understand that I just need the Session ID and I should be able to transfer this in a header field. But the problem is once it's on the 'other side', there is no way (in classic ASP) to set the session ID to the value from the header. It's not possible to do something like: Session.SessionID = Header.getHeaderSomething("sessionID")

I just kind of need to impersonate the client when I do a server side HTTP request.

(Mar 31 '14 at 17:18) FuRaz

But you could use an HTTP request parameter ( not an HTTP request header field) and ASP certainly has access to those. (I thought ASP would also have access to HTTP header fields too..)

(Apr 01 '14 at 02:10) chilkat ♦♦

Have you tried s = Request.ServerVariables("HTTP_<<your_header>>")? This is from my go to asp reference W3Schools http://www.w3schools.com/asp/coll_servervariables.asp

(Apr 09 '14 at 14:38) emartinson
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 31 '14 at 10:09

Seen: 2,728 times

Last updated: Apr 09 '14 at 14:38

powered by OSQA