Web API called OK from Chrome, doesn't work with IE9 (DotNetNuke)

I am puzzled by this. I am writing a web API method that works fine when called via ajax in Chrome, but the same call returns "Unauthorized" when created in IE9 ... I am using the DotNetNuke 7 web API implementation and when debugging the call does not hit mine breakpoint in the "processUpload" method. What could be causing this?

Here are my snippets, thanks for the help

data = { alc: 'private', bucket: 'Dev', file: file.name, key: 'drop/' };
$.ajax({
    url: sf.getServiceRoot('mySite') + "Upload/processUpload",
    type: 'POST',
    data: data,
    beforeSend: sf.setModuleHeaders
}).done(function (response, status) {
    if (status == "success") {
        params[response.file] = { policy: response.policy, signature: response.signature }
    }
}).fail(function (xhr, result, status) {
    alert("Uh-oh, something broke: " + status);
});

      

+3


source to share


1 answer


This is what my ajax call looks like

odata = { alc: 'private', bucket: 'Dev', file: file.name, key: 'drop/' };
    $.ajax({
        type: "POST",
        contentType: "application/json;charset=utf-8",
        url: sf.getServiceRoot('mySite') + "Upload/processUpload",
        beforeSend: sf.setModuleHeaders,
        data: odata ,
        success: function (result) {
            params[response.file] = { policy: response.policy, signature: response.signature }
        },
        error: function (xhr, status, error) {
    alert("Uh-oh, something broke: " + xhr.responseText);
        }
    });

      



What you can also try is change your web.config below

<modules runAllManagedModulesForAllRequests="true">

      

0


source







All Articles