如何扩展客户端的超时时间上做一个.NET Web服务岗位? [英] How do I extend the client's timeout on making a .NET web service post?

查看:138
本文介绍了如何扩展客户端的超时时间上做一个.NET Web服务岗位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从.NET控制台应用程序到.NET Web服务的职位。我知道,在服务器端的超时时间为20分钟,但如果我的客户需要100多秒,我发布数据,该服务,然后我得到一个超时异常。我怎么会告诉我的客户要等现有的20分钟超时?

I am making a post from a .NET console app to a .NET web service. I know that the timeout on the server side is 20 min, but if my client takes more than 100 seconds to post my data to that service then I get a timeout exception. How would I tell my client to wait the available 20 min to timeout?

推荐答案

在客户端,你的web服务的对象有一个超时值。它应该是pretty的容易被要设置:

on the client side, your webservice object has a timeout value. It should be pretty easy to set by going:

myServiceInstance.Timeout = 1200000

20分钟

这篇关于如何扩展客户端的超时时间上做一个.NET Web服务岗位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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