Note that there are some explanatory texts on larger screens.

plurals
  1. POI need to speed up my .NET webservice calls to Classic ASP webservices
    primarykey
    data
    text
    <p>I am calling Classic ASP Webservices from a .NET application. I have two instances of slow processing of the webservice and fast processing. </p> <p>The slow way (several seconds at the most) is where I actually read the data returned as such:</p> <pre><code>Dim oRequestAOCP As WebRequest Dim oResponseAOCP As HttpWebResponse = Nothing Dim dataStreamAOCP As Stream = Nothing Dim readerAOCP As StreamReader = Nothing Dim responseFromServerAOCP As String Dim sAOCP = Session("SecureURL") &amp; "/services/rtOrderEntryAOCP.asp" sAOCP = sAOCP &amp; "?coskey=" &amp; Server.UrlEncode(Session("GUID")) sAOCP = sAOCP &amp; "&amp;OrderID=" &amp; Server.UrlEncode(Session("OrderID")) oRequestAOCP = WebRequest.Create(sAOCP) oRequestAOCP = CType(oRequestAOCP, HttpWebRequest) oRequestAOCP.Method = "GET" oResponseAOCP = CType(oRequestAOCP.GetResponse(), HttpWebResponse) dataStreamAOCP = oResponseAOCP.GetResponseStream() readerAOCP = New StreamReader(dataStreamAOCP) responseFromServerAOCP = readerAOCP.ReadToEnd() Dim xmlAOCP As New XmlDocument() xmlAOCP.LoadXml(responseFromServerAOCP) Dim nodeAOCP As XmlNodeList = xmlAOCP.GetElementsByTagName("SUCCESS") Dim valueAOCP = CBool(nodeAOCP(0).InnerText) </code></pre> <p>Then, the following is quite fast (sub-second), where I only expect the HTTP status to be returned and nothing else - not a good MO, due to needing data back from webservices in most cases.</p> <pre><code>Dim oRequest As WebRequest Dim oResponse As HttpWebResponse = Nothing Dim oEmail As New Email() 'now, call the webservice to get the AESBlock Dim strUrl = Session("SecureURL") &amp; "/services/rtOrderEntryStatusUpdate.asp" strUrl = strUrl &amp; "?GUID=" &amp; Server.UrlEncode(Session("MISCGUID")) strUrl = strUrl &amp; "&amp;Status=" &amp; Server.UrlEncode(sStatus) strUrl = strUrl &amp; "&amp;Error=" &amp; Server.UrlEncode(sError) 'make the call to the webservice to prime the order oRequest = WebRequest.Create(strUrl) oRequest = CType(oRequest, HttpWebRequest) oRequest.Method = "GET" oResponse = CType(oRequest.GetResponse(), HttpWebResponse) </code></pre> <p>What can I do to speed things up when I need data returned?</p>
    singulars
    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