CometD .NET is throwing an exception when calling the setCookie(string, string)
method on BayeuxClient
because I haven't set a domain for these cookies, but I don't see a property or method to set the domain, and none of the overloads on setCookie(...)
take a domain as a parameter.
Code:
this._bayeuxClient = new BayeuxClient(
"https://***.salesforce.com/cometd/24.0", //instance omitted
new List<ClientTransport> { new LongPollingTransport(null) });
this._bayeuxClient.setCookie("com.salesforce.LocaleInfo", "us");
//...
this._bayeuxClient.handshake(); //Exception is thrown here.
this._bayeuxClient.waitFor(1000,
new List<BayeuxClient.State> { BayeuxClient.State.CONNECTED });