locked
About the createDownloadAsync() and the startAsync() API problems RRS feed

  • Question

  • When I use the createDownloadAsync(uri,storagefile) ,for example :the uri = http://.....,in this case, I use the proxy with the Windows.Security.Credentials.PasswordCredential(),and it can startAsync() successfully.But when I changes the uri = https://....,   use the same proxy,DownloadOperation::StartAsync raise exception 0x80072EF3? What could cause the exception?

    Thursday, March 28, 2013 9:30 AM

All replies

  • Please post complete sample code to reproduce the issue.


    Jeff Sanders (MSFT)

    Thursday, March 28, 2013 7:38 PM
    Moderator
  • var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();

    var proxy = new Windows.Security.Credentials.PasswordCredential();

    proxy.password =

    "***";

    proxy.userName =

    "***";

    downloader.proxyCredential = proxy;

    downloader.method =

    'POST';

    downloader.setRequestHeader(

    "isZip", "false");

    var uri = new Windows.Foundation.Uri("http://-------");

    downloader.createDownloadAsync(uri, storageFile, e).then(function (e) {

    e.startAsync().then(

    function (e) {

    },function(err) {})

    here,if I use the http://-----, it works successfully,but if I replace the https://---- ,it will accept the err,is unknow runtime error.But I don't know why?

    Friday, March 29, 2013 1:41 AM
  • Hi Bing,

    Thanks for the Clarification!

    If you post your url:  https://---- into Internet Explorer on the same machine, what errors or warnings do you see?  Are there any certificate problems?

    -Jeff


    Jeff Sanders (MSFT)

    Friday, March 29, 2013 12:02 PM
    Moderator
  • Yes ,if I use the IE,it will prompt the "There is a problem with this website's security certificate."it is the certificate error,but if I used the chrome to visit ,it will has no problem.
    Friday, April 12, 2013 2:14 AM
  • That is the problem.  The certificate has problems and cannot be trusted or verified.  You must resolve these errors or include the server certificate as part of the package.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, April 12, 2013 12:02 PM
    Moderator
  • Today I find that  if  I use the IE to visit the url , it hasn't the error certificate ,it looks like normal.Maybe the server or the IE has fixed it.

    But I  my code also didn't work even if I add the downloader.setRequestHeader("UserAgent", "11").

    Monday, April 15, 2013 8:19 AM