Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy Transactions are getting delayed in network
    primarykey
    data
    text
    <p>I am using Upload File method of WebClient class to post transactions to server by using Http Post Method. Before posting transaction to server I am keeping log of this request with current date and time and also using wireshark for network logs. If I compare time of both log files there are always time difference of 15-30 seconds for same transaction even both are at the same server(Network logs showing time delay of 15-30 seconds). </p> <p>I am surprised what is causing this delay in network as after logging it into log file I am immediately posting this transaction to server.</p> <p>Method I am using for posting transaction is :-</p> <pre><code>private BankCommonLayer.httpsResponse SendhttpsMessage(string strRequest, string RRN) { BankCommonLayer.httpsResponse hr = new BankCommonLayer.httpsResponse(); string strDirName = ConfigurationSettings.AppSettings["Attachment_file"]; try { string strFileName = strDirName + RRN + ".txt"; Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(strFileName, HexToAscii(strRequest), false, System.Text.Encoding.GetEncoding(28591)); FileInfo fi = new FileInfo(strFileName); NameValueCollection q = new NameValueCollection(); q.Add("Message", fi.Name); string url = ConfigurationSettings.AppSettings["https_url"]; WebClient wc = new WebClient(); wc.QueryString = q; string ResultString = string.Empty; byte[] postBytes = wc.UploadFile(url, "POST", strFileName); if (postBytes.Length != 0) hr.ResponseString = System.Text.Encoding.ASCII.GetString(postBytes).ToString(); else hr.ResponseString = "No response"; BLCommonFunctions.WriteLogger(1, "FIG Response string :- " + hr.ResponseString.ToString(), ref swLogWriter, strLogPath); //Write the string to a file. System.IO.StreamWriter file = new System.IO.StreamWriter(strFileName, true); file.WriteLine(); file.WriteLine("Response String :" + hr.ResponseString); file.Close(); Console.WriteLine(hr.ResponseString); hr.SendSuccess = true; } catch (WebException ex) { hr.SendSuccess = false; BLCommonFunctions.WriteLogger(1, "FIG Response string :- NULL (Because " + ex.Message + ")", ref swLogWriter, strLogPath); } catch (Exception ex) { hr.SendSuccess = false; BLCommonFunctions.WriteLogger(1, "FIG Response string :- NULL (Because " + ex.Message + ")", ref swLogWriter, strLogPath); } return hr; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload