jquery ajax响应+函数调用进程在不同的AppDomain中

时间:2022-09-25 23:59:46

From my asp.net web app I'm calling a WebMethod in a WebService on button click using jquery ajax. This webmethod starts a process on the server in a different AppDomain. When the process is started without switching to another AppDomain the jquery ajax response is received accordingly after 2 milliseconds, however when the process is in another AppDomain the response is never received and Success is never reached although the process is triggered successfully, and this causes other functions to also get delayed. Any idea what could be causing this issue please?

从我的asp.net Web应用程序,我使用jquery ajax在按钮单击中调用WebService中的WebMethod。此webmethod在服务器上的另一个AppDomain中启动进程。在没有切换到另一个AppDomain的情况下启动进程时,相应地在2毫秒后收到jquery ajax响应,但是当进程在另一个AppDomain中时,永远不会收到响应,并且虽然成功触发了进程,但永远不会成功,这会导致其他功能也会延迟。知道什么可能导致这个问题吗?

function startTests() {
    $.ajax({
        url: "DataServices/DataServices.asmx/startTests",
        dataType: "text",
        type: "POST",
        data: {},
        success: function (data) {

                showWarning("Started Test Execution", 5000);

        }
    });

}

1 个解决方案

#1


0  

Try using JSONP. It allows cross-domain AJAX calls.

尝试使用JSONP。它允许跨域AJAX调用。

json-p.org/

#1


0  

Try using JSONP. It allows cross-domain AJAX calls.

尝试使用JSONP。它允许跨域AJAX调用。

json-p.org/