Saturday, 15 August 2015

c# - Missing Cookies; getting 1/3.. I thought this was handled automatically, why are things not working correctly -


This trend of cookies is not changing, I absolutely copy it correctly and it should be a simple task because it's automatic The form is handled anyway. Why am I not getting the proper cookie recovery?

  Public class HTTP: WebClient {public HTTP}: this (new cookie contributor ()) {} public HTTP (cookie container C) {cookie container = C; } Public CookieContainer CookieContainer {get; Set; } Secure Override WebRequest GetWebRequest (URI address) {WebRequest request = base.GetWebRequest (address); Var castRequest = Request HttpWebRequest; If (castRequest! = Null) {castRequest.CookieContainer = CookieContainer; CastRequest.Accept = "text / html, application / xhtml + xml, application / xml; q = 0.9, * / *; q = 0.8"; CastRequest.UserAgent = "Mozilla / 5.0 (Windows NT 6.1; WOW64) Apple WebKat / 537.22 (KHTHML, like GECO) Chrome / 25.0.1364.172 Safari / 537.22"; } Refund Request; }} Public Zero Check URL () {Cookie Container Cookware = New Cookie Container (); HTTP client = new HTTP (cooker); String feedback data = client.DownloadString (url); Response.data = client.UploadString (URL, login data); RTB. Text = response data; }   

You probably want to hook in the webs and read cookies from there. The request does not change after the request is sent.

No comments:

Post a Comment