WSDL第一次调用总是花费超过10秒

时间:2016-10-19 11:58:25

标签: vb.net wcf wsdl httpurlconnection service-reference

[VB.net] 大家好,

我的代码有一个小问题。 我的家乡有一个现有的服务器,我正在尝试创建与服务器的连接,它的工作原理。 我的问题是,第一次调用,如果是登录或其他方法,它总是需要大约10秒钟:after first call

然后当我拨打第一个电话时,会发生这种情况:enter image description here

这是我的AppConfig:

<configuration>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
    </startup>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="binding"></binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="link"
                 binding="basicHttpBinding" bindingConfiguration="binding"
                 contract="ServiceReference.serviceporttypüe" name="port" />
        </client>
    </system.serviceModel>
</configuration>

1 个答案:

答案 0 :(得分:0)

据我所知,IIS会在一段时间后释放资源,当您在此之后拨打电话时,从服务获得响应需要更长的时间。

编辑:也检查一下 IIS-Auto-Start

相关问题