|
Rank: Member Groups: Member
Joined: 7/30/2018 Posts: 16
|
Hello,
I am trying to setup cookies like
This one doesnt work, can't understand why, it is string, I also tried .ToString() methods as well. no chance webControl1.WebView.Engine.CookieManager.SetCookie("http://localhost:8080/orders", new EO.WebEngine.Cookie("connect.sid", editedConnectSid));
however if I copy paste the exact same cookie and set the cookie, it works. It also works if I send this cookie to browser and set cookies via javascript, it again works.
webControl1.WebView.Engine.CookieManager.SetCookie("http://localhost:8080/orders", new EO.WebEngine.Cookie("connect.sid", "s%3A6NJDB7mqoJ5CY4kcXGUzO0mPBP54ctqy.94PwZb2w578BQ33UjGJVhJ9OyVABJz%22FCKHQlOuhIDoY"));
Any ideas or solutions?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Hi,
This is something you need to work out yourself. Our product does not care whether you pass a string constant or a string variable. It makes no difference on our part.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/3/2015 Posts: 19
|
Maybe you should try URLEncode your string:
HttpUtility.UrlEncode(editedConnectSid)
|
|
Rank: Member Groups: Member
Joined: 7/30/2018 Posts: 16
|
I have tried encode url as well but no chance, it is super absurd and weird why it doesnt work.
Any other ideas?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
This absolutely is a code issue on your end. Because internally we make no distinction between a variable and a constant (we take the string's value and that's it, where/how that value comes from doesn't matter), the only reason it does not work is the value you passed in is different. So that should be your focus on troubleshooting this issue. In short, the two strings are different and you need to find out how and why they are different. There is really nothing else about this. If you have trouble finding out how the strings are different, try to use the following code to get the byte array of the string and then compare the returned byte array byte by byte:
Code: C#
byte[] data = System.Text.Encoding.Unicode.GetBytes(s);
Alternatively, you can also use a traffic monitor such as Fiddler to monitor the traffic from our control to the web server. You should see the cookie values being sent in Fiddler. Hopefully that will tell you what is different between the two cases. Hope this helps.
|
|