简体   繁体   English

Asp.net Web服务超时问题

[英]Timed out Issue with Asp.net webservice

I have a asp.net web service and it has multiple web method. 我有一个asp.net Web服务,它有多个Web方法。

In my client side it has timed out configuration like, 在我的客户端,它已超时配置,例如

 <binding name="TestWebServiceSoap" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:50:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="None">

When i have to call the web service, i am creating a new instance of the web service once, 当我必须调用Web服务时,我将创建一次Web服务的新实例,

 TestWebServiceSoapClient objWebServiceClient = objWebServiceClient = new TestWebServiceSoapClient(strEndPointName, strEndPointAddress);

Where strEndPointName is the endpoint name and the strEndPointAddress is the end point address 其中strEndPointName是端点名称,而strEndPointAddress是端点地址

And then call multiple web method based on this instance (without creating a new instance for every web method) Like, 然后根据此实例调用多个Web方法(无需为每个Web方法创建新实例)

 objWebServiceClient.TestWebMethodone(string parameter1,string parameter2); objWebServiceClient.TestWebMethodtwo(string parameter1,string parameter2); objWebServiceClient.TestWebMethodthree(string parameter1,string parameter2); 

and so on. 等等。

Now My question is, 现在我的问题是

Does the timed out configuration for the end point is applied for each web method separately? 端点的超时配置是否分别应用于每种Web方法?

That is does TestWebMethodone,TestWebMethodtwo,TestWebMethodthree will get the timed out value separately for data transfer operation? 那是不是TestWebMethodone,TestWebMethodtwo,TestWebMethodthree将分别获取超时值以进行数据传输操作?

Does the timed out configuration for the end point is applied for each web method separately? 端点的超时配置是否分别应用于每种Web方法? That is does TestWebMethodone,TestWebMethodtwo,TestWebMethodthree will get the timed out value separately for data transfer operation? 那是不是TestWebMethodone,TestWebMethodtwo,TestWebMethodthree将分别获取超时值以进行数据传输操作?

Yes, each operation on webservice will get its own timeout. 是的,Web服务上的每个操作都会获得自己的超时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM