所用的时间扔EndPointNotFoundException [英] Time taken to throw EndPointNotFoundException

查看:109
本文介绍了所用的时间扔EndPointNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码调用服务,如果该服务被停止以任何理由它给了我EndPointNotFound例外。

I am calling the service from code and if the service is stopped for any reason it gives me EndPointNotFound exception.

 <binding name="NormalMode" transferMode="Buffered" receiveTimeout="24.20:31:23.6470000">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="None" />
    </binding>



我没有设置openTimeOut所以它会考虑缺省为1分钟超时。

I haven't set the openTimeOut so it will consider the default 1 minute timeout.

我打电话服务这种方式,

I am calling the service this way,

 private void MyServiceCall(Action serviceCall)
    {
        try
        {
            if (serviceCall != null)
            {
                serviceCall();
            }
        }
        catch (EndpointNotFoundException endpointNotFoundException)
        {
                            throw new EndpointNotFoundException(endpointNotFoundException.Message, endpointNotFoundException);
        }



我的问题是,如果服务被停止,然后将它拿1分的投EndPointNotFoundException ??

My question is if service is stopped then will it take 1 minute to throw the EndPointNotFoundException??

编辑:

在这种情况下,我知道服务被停止。我被停止服务测试这种方式。现在的问题是,我们已经开发断开塞纳里奥如果服务被采空比它会返回默认的数据,但它需要一定的时间,所以我investigatig是它openTimeOut负责吧。

In this case i know that service is stopped. I am testing it that way by stopping the service. The question is we have developed the disconnected senario and if service is stoped than it will return the default data but it takes time so i am investigatig is it the openTimeOut which is responsible for it.

推荐答案

一个时间跨度值,指定提供的打开操作完成的时间间隔。此值应大于或等于零。默认值是零点01分00秒。

A TimeSpan value that specifies the interval of time provided for an open operation to complete. This value should be greater than or equal to Zero. The default is 00:01:00.

所以,我是从这个理解是,这已经是打开的操作应在一分钟内完成。任何意见 ??因为我tesitng它,它只需5秒,扔EndPointNotFoundException

so what i am understanding from this is that the operation which is already open it should be completed within a minute. Any comment ?? Because i am tesitng it and it takes only 5 seconds to throw the EndPointNotFoundException

这篇关于所用的时间扔EndPointNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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