Archived Forum Post

Index of archived forum posts

Question:

How can I share sessions between two CkHttp objects ?

Apr 24 '14 at 12:14

I use two CkHttp objects in my application, one QuickGetStr a url which creates some sessions on the http server, then I use the other CkHttp object to access the http server, I cannot access the sessions.


Answer

One possible solution is to set the CookieDir property equal to the same directory path for each object. Set the SendCookies and SaveCookies properties as you desire. For example, perhaps only the object that establishes the session would set SaveCookies = true, and both would set SendCookies = true.


Answer

It works after changing CookieDir setting from memory to an actual dir. Now the further question is: How can I share sessions between CkHttp and IE ?

I set CookieDir to {Temporary Internet Files}, where cookie is stored in a plain text file, but CkHttp's cookie in a xml file.


Answer

I'm sorry to say there is nothing in Chilkat to share sessions with IE.