本文转自:http://social.msdn.microsoft.com/Forums/vstudio/en-us/ed89ae3c-e5f8-401b-bcc7-333579a9f0fe/webservice-client-timeout?forum=wcf

After creating proxy object do this :

client.InnerChannel.OperationTimeout = new TimeSpan(0,10,0);

--------------------------------------------

Please find the code below:

            ReportPortClient client = new ReportPortClient("Report");
client.Endpoint.Binding.OpenTimeout = new TimeSpan(, , );
client.Endpoint.Binding.CloseTimeout = new TimeSpan(, , );
client.Endpoint.Binding.SendTimeout = new TimeSpan(, , );
client.Endpoint.Binding.ReceiveTimeout = new TimeSpan(, , ); client.ClientCredentials.UserName.UserName =strUserName;
client.ClientCredentials.UserName.Password = strPassword;
client.Endpoint.Address = new System.ServiceModel.EndpointAddress(strURL);

[转]Webservice client timeout的更多相关文章

  1. How do I set the timeout for a JAX-WS webservice client?

    How do I set the timeout for a JAX-WS webservice client? up vote58down votefavorite 27 I've used JAX ...

  2. 阿里云 docker连接总报超时 registry.cn-hangzhou.aliyuncs.com (Client.Timeout exceeded while awaiting headers

    Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: net/http: request can ...

  3. net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting head

    使用docker 拉镜像的时候,出现下面的错误: net/http: request canceled while waiting for connection (Client.Timeout exc ...

  4. docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers).

    docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled ...

  5. Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

    docker pull nginx 遇到这个问题 Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: ...

  6. 【docker问题】Client.Timeout exceeded while awaiting headers

    在进行docker pull 拉取镜像时,出现过下面的错误: net/http: request canceled while waiting for connection (Client.Timeo ...

  7. webservice client setTimeOut

    一:eclipse生成的client,基于axis client_sub.getOptions().setTimeOutInMilliSeconds(1000*60); client_sub表示一个客 ...

  8. 使用cxf创建webservice 出现timeOut的问题,设置spring超时时间

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  9. docker报错:Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

    在github上开到这样一条 于是 这两个选项换着来 具体怎么回事,咱也不知道,咱也不敢问 改完后蹭蹭的

随机推荐

  1. ASP.NET MVC- 解决HTML转码

    在MVC里从Controller发送一段带有HTML的文字到View视图时,MVC是会将这段代码进行转码的. 一.使用MvcHtmlString转HTML转码 如果想不让这段文字进行转码,以HTML的 ...

  2. 【ToolGood.Words】之【StringSearch】字符串搜索——基于BFS算法

    字符串搜索中,BFS算法很巧妙,个人认为BFS算法效率是最高的. [StringSearch]就是根据BFS算法并优化. 使用方法: string s = "中国|国人|zg人|fuck|a ...

  3. How can I terminate a thread that has a seperate message loop?

    http://www.techques.com/question/1-10415481/How-can-I-terminate-a-thread-that-has-a-seperate-message ...

  4. Slony-I 文摘

    http://www.onlamp.com/pub/a/onlamp/2004/11/18/slony.html  我特别喜欢这篇文章,就进行了转载和翻译. Introducing Slony by  ...

  5. 防火墙没关导致 ORA-12541: TNS: 无监听程序

    电脑用着用着突然Oracle就报出下面的错误,按照网上的办法搞了几个小时都没有搞好. Oracle重装了好几次也没用,实在没办法又花了个多小时装了个虚机,结果也是同样的错误. 于是恍然大悟,可能是物理 ...

  6. 【转】python代码风格-PEP8

    转载自http://www.douban.com/note/134971609/ Python 的代码风格由 PEP 8 描述.这个文档描述了 Python 编程风格的方方面面.在遵守这个文档的条件下 ...

  7. [Jobdu] 题目1531:货币面值

    题目描述: 小虎是游戏中的一个国王,在他管理的国家中发行了很多不同面额的纸币,用这些纸币进行任意的组合可以在游戏中购买各种装备来提升自己.有一天,他突然很想知道这些纸币的组合不能表示的最小面额是多少, ...

  8. Java读取Properties配置文件

    1.Properties类与Properties配置文件 Properties类继承自Hashtable类并且实现了Map接口,使用键值对的形式来保存属性集.不过Properties的键和值都是字符串 ...

  9. android 下修改 hosts文件 及 out of memory的解决

    因为android模拟器host文件无法修改,导致无法通过域名使用http方法调用内网服务,因此从网上大量转载的一种方法,这种方法: 1. 通过emulator -avd avdName -parti ...

  10. j简单的递归

    1 某人写了n封信和n个信封,如果所有的信都装错了信封.求所有的信都装错信封共有多少种不同情况. 归纳法例子 1.有n个硬币(n为偶数)正面朝上排成一排,每次将n-1个硬币翻成朝上为止.编程让计算机把 ...