In IE 11 I have a test case that uses an ajax call to an https address and it works fine after installing the certificate for the site. The same call fails in Excel task pane add-in with the error:
XMLHttpRequest: Network Error 0x80070005
Here's the ajax call:
$.support.cors = true;
$.ajax({
crossDomain: true,
async: true,
url: 'https://192.168.1.3:3001/submit',
data: jsonString,
cache: false,
contentType: 'application/json',
processData: false,
type: 'POST',
success: function (data, textStatus, jqXHR) {
// Callback code
document.getElementById("demo").innerHTML = "success";
console.log("Success! Submission id is: " + data.id);
},
error: function (xhr) {
document.getElementById("demo").innerHTML = "An error occured: " + xhr.status + " " + xhr.statusText + jsonString;
console.log("An error occured: " + xhr.status + " " + xhr.statusText);
}
});
IE returns no error. Excel Addin running in Visual Studio 2017 show java console log: SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
And the xhr.status is 0 and xhr.statusText is "error"
Apparently, IE will allow using a certificate with a mismatched address if it is installed whereas an Office add in will not. I resolved the issue by regenerating my certificate and ensuring the FQDN used is the same as the url in the address bar of IE. Then via IE reinstalled the new certificate in the Trusted Root Certificates.
User contributions licensed under CC BY-SA 3.0