【问题标题】:Performance issues with aspNetCompatibilityEnabled WCF service called from jQuery从 jQuery 调用的 aspNetCompatibilityEnabled WCF 服务的性能问题
【发布时间】:2012-08-14 21:03:57
【问题描述】:

我的应用程序中有一个 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 上

【问题讨论】:

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


    【解决方案1】:

    您似乎在 IIS 中托管您的应用程序。 aspNetCompatibilityEnabled 启用了 to get benefits 的 IIS 功能,用于非 http 协议,例如 net.*

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

    【讨论】:

    • 嗨,塞尔吉奥。感谢您的答复。这在 IIS 启动或第一次 WCF 调用期间看不到。当服务器上有大量负载时,就会出现此问题。
    猜你喜欢
    • 2010-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多