从jQuery调用的aspNetCompatibilityEnabled WCF服务的性能问题

时间:2012-08-14 21:03:57

标签: jquery asp.net wcf asp.net-ajax

我的应用程序中有一个aspNetCompatibilityEnabled WCF服务。

我正在进行这样的ajax调用(最后直接调用WCF服务) -

        $.ajax({
            url: '~/WCFServices/MyService.svc/GetAllFoo',
            cache: false,
            contentType: 'application/json; charset=utf-8',
            data: {.............//Omitted/////// },
            dataType: 'json',
            type: 'GET',
            success: function (msg, status) {
                   .............//Omitted///////
            },
            error: function (xhr, status, err) {
                   .............//Omitted///////
            }
        });

这种方法一切正常。 但是,当我在生产中使用它时,以及高负载时,存在性能问题。

使用某些工具,我发现/System.ServiceModel.Activation.ServiceHttpHandlerFactory+ServiceHttpHandler大约需要20秒。

我不确定为什么会这样,以及可以采取哪些措施来改善性能。 非常感谢任何帮助/指针。

其他资讯─ 应用程序托管在IIS 7.5

1 个答案:

答案 0 :(得分:0)

您似乎在IIS中托管了应用程序。 aspNetCompatibilityEnabled为{http 1}}等非http协议启用了to get benefits个IIS功能。

有几个slow down issues,例如IIS启动,first call to WCF service