使用ajax的多个IIS工作进程问题 [英] Multiple IIS worker process issue with ajax

查看:47
本文介绍了使用ajax的多个IIS工作进程问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是场景:



我正在使用带有ASPX页面的asp.net Web应用程序。在其中一个Web页面中,我编写了几个Web方法,并从AJAX中调用它们。现在,当应用程序池的工作进程设置为1时,这可以正常工作,但是一旦创建了Web Garden,它就会抛出可怕的'500'异常。任何帮助将非常感激。



我尝试过:



My Web Methods看起来像这样:



[System.Web.Services.WebMethod(EnableSession = true)]

public static ListDisbursementStatus FindResult(string userId,string disbursementDate,string currentPageNo =1)

{

.....

}



来自Ajax我称这种方法:



$ .ajax({

url:< pagename> .aspx / FindResult,

类型:POST,

.. ......

});

Here is the scenario:

I am using a asp.net web application with ASPX pages. In one of the Web Page I have written couple of Web Methods and are calling them from AJAX. Now this works fine when the worker process of the application pool is set to 1 but as soon as a Web Garden is created it throws the dreaded '500' exception. Any help will be really appreciated.

What I have tried:

My Web Methods Looks something like this:

[System.Web.Services.WebMethod(EnableSession =true)]
public static ListDisbursementStatus FindResult(string userId ,string disbursementDate, string currentPageNo = "1")
{
.....
}

From Ajax I am calling this method:

$.ajax({
url: "<pagename>.aspx/FindResult",
type: "POST",
........
});

推荐答案

.ajax({

url:< ; pagename> .aspx / FindResult,

类型:POST,

........

});
.ajax({
url: "<pagename>.aspx/FindResult",
type: "POST",
........
});


请检查模仿


这篇关于使用ajax的多个IIS工作进程问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆