Sunday, 15 January 2012

c# - Way to get ALL cookies created in Awesomium? (including Http) -



c# - Way to get ALL cookies created in Awesomium? (including Http) -

i'm using awesomium .net api log in http://www.habbo.com using username , password provided user in text box. issue have send farther requests (eg. navigate room - habbo online game) via http need send same cookies, otherwise doesn't work.

i'm trying send navigate request using code:

using (webclient wc = new webclient()) { wc.headers["x-app-key"] = token; wc.downloadstring(new uri(string.format("http://www.habbo.com/components/roomnavigation?targetid={0}&roomtype=private&move=true", roomid))); }

i need attach http cookies wc in order successful. i'm logging in http://www.habbo.com using code:

public int timer = 0; public void attemptlogin_tick(object sender, eventargs e) { timer++; if (timer == 1) { webcontrol1.source = new uri("http://www.habbo.com/client"); } if (timer == 3) { webcontrol1.source = new uri(string.format("https://www.habbo.com/account/submit?credentials.username={0}&credentials.password={1}", username2, password2)); } if(timer == 6) { webcontrol1.source = new uri("http://www.habbo.com/client"); } }

i know can of cookies using

webcontrol1.executejavascriptwithresult("document.cookie;");

but doesn't http ones need also. cookies unique each session, far i'm aware using httpwebrequest them result in different http cookies ones need (and hence log me out if tried sending them instead, indicate had 2 sessions logged in).

does have ideas? thanks.

c#

No comments:

Post a Comment