locked
IServerXMLHTTPRequest vs WinHTTP Performance

    Question

  • I am trying to compare IServerXMLHTTPRequest and WinHTTP in regards to performance.

    I would like to know:

    1. What is the maximum limit of the data/file that can be sent?
    2. What is the transfer rate if the file to be sent is the maximum limit

    • Edited by RonRaySal Wednesday, December 04, 2013 1:45 AM
    Wednesday, December 04, 2013 1:05 AM

Answers

All replies

  • IServerXMLHTTPRequest is not available for use in Windows Store apps. IServerXMLHTTPRequest internally uses WinHTTP.

    Windows Store apps only lets you use the IXMLHttpRequest2 interface which has a Send() method. The second parameter takes in a ULONGLONG which is a 64 bit unsigned integer, so that's the maximum length of the payload that is supported. http://msdn.microsoft.com/en-us/library/windows/desktop/hh831164(v=vs.85).aspx 

    The transfer rate that you get is the default rate that WinINet supports. You cannot change the transfer length - which is a socket option from a Windows Store app.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Wednesday, December 04, 2013 2:13 AM
    Moderator
  • I have a working code:

    CComPtr<MSXML2::IServerXMLHTTPRequest> xmlHttp;
    
    xmlHttp.CoCreateInstance(__uuidof(ServerXMLHTTP));
    
    _bstr_t sMethod = _T("POST");
    _bstr_t sUrl = "http://example.com/something.cgi";
    
    xmlHttp->open(sMethod,sUrl,false);
    
    _bstr_t sPostData = <content to be sent>;
    
    xmlHttp->send((BSTR)sPostData);

    And I was asked to changed the url from http to https. Also, they are asking what is the maximum limit of the data/file that can be sent and that transfer rate.

    Wednesday, December 04, 2013 2:35 AM
  • For Windows Store Apps, you should consider user the Windows.Web.Http HttpClient  family of APIs; they will also perform well and have a simpler programming model.
    Wednesday, December 04, 2013 5:17 PM
  • IServerXmlHTTPRequest is not available for use in a Windows Store app.

    It is only available for use in a "desktop" app.

    To answer your question, you can only upload upto 4GB if you are using IServerXmlHTTPRequest object. See this link for more information: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384085(v=vs.85).aspx


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Thursday, December 05, 2013 1:34 AM
    Moderator