c# - Work with CookieContainer on WP8 -


I want to parse an html page. But when I get authenticated on the server, I can only read this html page but with my current code, it has happened that I am not logged in. Here is my current code:

  // When I open a button Private zero BtLog_Click (Object Sender, RoutedEventArgs e) {String url = "https://subcard.subway.co.uk/de_cardholder / Servlet / SPLoginServlet "; Stringbirder body = new stringbuilder (); Body.Append ("language =" + "D"); Body.Append ("& amp; user =" + tbUser.text); Body.Append ("& amp; Password =" + pbPassword.Password); Body.Append ("& transIdentType =" + "1"); Body.Append ("& amp; programID =" + "6"); Bool isNetwork = NetworkInterface.GetIsNetworkAvailable (); If (! IsNetwork) {} else {try {WebClient webClient = new WebClient (); WebClient.Headers ["content-type"] = "application / x-www-form-urxed"; // Your app header content-type webClient.Encoding = Encoding.UTF8; WebClient.UploadStringAsync (new URI (url), "post", body.ToString (), blank); Web client client = new webclient (); Client.DownloadStringCompleted + = New DownloadStringCompletedEventHandler (webClient_DownloadStringCompleted); Client.DownloadStringAsync (new Uri ("https://subcard.subway.co.uk/de_cardholder/JSP/SPSummary.jsp")); } Hold {MessageBox.Show ("Error"); }}} Zero webClient_DownloadStringCompleted (Object Sender, DownloadStringCompletedEventArgs e) {Message Box.Show (e.Result.ToString ()); // If I'm logged in and found a string which I want to parse, but first thing else is to work} I thought I had to work with Cookie Container But I do not know how it works thanks to any advice or solution for my problem !! 

According to my understanding, the cookie server has nothing to do with authentication information on your session or web server. is not.

If you have a control over the API / Web service that you are calling while trying to return some token information from you, by sending the token from your next http request to authenticate your device.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -