login about faq

Hey.

Am I right if I want to use 2 different instances of Chilkat.Http I have to define 2 different pathes for cookies? So if I have 2 proxies and I want to login on one webserver with 2 different login details I don't want to share the cookies. So I have to do something like this?

        Http http = new Http();
        // Cookies
        string path = Path.Combine("Cookies", string.Join("_", Proxy.Address, Proxy.Port));
        if (!Directory.Exists(path))
            Directory.CreateDirectory(path);
        http.CookieDir = path;
        http.SendCookies = true;
        http.SaveCookies = true;

BlackMatrix

asked Oct 30 '13 at 19:30

BlackMatrix's gravatar image

BlackMatrix
11336


If using "memory" instead of a file (meaning that the CookieDir property is set to the keyword "memory" so that an in-memory cache is used), then each CkHttp object has it's own in-memory cache of cookies that is only in existence while the CkHttp object exists.

link

answered Nov 04 '13 at 11:39

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Yes, if you want cookies persisted to a file, and you don't want them shared between different instances of Chilkat.Http objects, then you would use separate files.

link

answered Nov 04 '13 at 10:04

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

No, its not necessary to save them to a file.

Ah okay, am I right, that memory is not sharing cookies between instances?

link

answered Nov 04 '13 at 11:26

BlackMatrix's gravatar image

BlackMatrix
11336

That's what I need, thank you :)

link

answered Nov 04 '13 at 12:32

BlackMatrix's gravatar image

BlackMatrix
11336

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×186
×98
×8
×3
×2

Asked: Oct 30 '13 at 19:30

Seen: 1,072 times

Last updated: Nov 04 '13 at 12:32

powered by OSQA