Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (IsLogin)
- {
- HttpWebResponse RedirectResponse = RedirectToUrl("https://services.test.com/Pages/Trans.aspx");
- Stream streamResponse = RedirectResponse.GetResponseStream();
- StreamReader streamRead = new StreamReader(streamResponse);
- outString = streamRead.ReadToEnd();
- System.Collections.ArrayList strAccountList = GetListByID("ctl00_PlaceHolderMain_AccountsDDL_ddlAccounts");
- for (int intAccountCount = 0; intAccountCount < strAccountList.Count; intAccountCount++)//Here all data from ddl all good
- {
- string[] strAcctList = strAccountList[intAccountCount].ToString().Split('t');
- string strAccountNumber = strAcctList[0];
- PostString += "__EVENTVALIDATION=" + GetValueByID(LoginInfo, "__EVENTVALIDATION") + "&";
- PostString += "ctl00$PlaceHolderMain$AccountsDDL$ddlAccounts=" + strAccountNumber + "&";//This have to change the option
- HttpWebRequest postRequest = (HttpWebRequest)WebRequest.Create("https://services.bankjerusalem.co.il/currentaccount/Pages/current.aspx");
- postRequest.CookieContainer = new CookieContainer();
- postRequest.CookieContainer = _cookies;
- postRequest.Method = WebRequestMethods.Http.Post;
- postRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)";
- postRequest.AllowWriteStreamBuffering = false;
- postRequest.ProtocolVersion = HttpVersion.Version11;
- postRequest.AllowAutoRedirect = false;
- postRequest.ContentType = "application/x-www-form-urlencoded";
- byte[] byteArray = Encoding.ASCII.GetBytes(PostString);
- postRequest.ContentLength = byteArray.Length;
- Stream newStream = postRequest.GetRequestStream();
- newStream.Write(byteArray, 0, byteArray.Length);
- newStream.Close();
- HttpWebResponse postResponse = (HttpWebResponse)postRequest.GetResponse();
- outString = "";
- Stream streamResponseLoginForm = postResponse.GetResponseStream();
- StreamReader streamReadLoginForm = new StreamReader(streamResponseLoginForm);
- outString = streamReadLoginForm.ReadToEnd();//Here i can see that data is not changed
- if (outString == null)
- {
- LogOut();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement