---
title: "调用webservice超时问题的解决"
author: "shellfish"
date: "2015-03-27T11:02:43Z"
tags: []
categories: ["编程语言"]
slug: "webservice"
draft: false
lastmod: "2015-03-27T11:02:43Z"
id: 2196063
url: "https://shellfish.iteye.com/blog/2196063"
---

c#做的webservice经常忘记扩大超时限制：

1、web.config：
<system.web></system.web>里面增加：<httpRuntime maxRequestLength="10240" appRequestQueueLimit="100" useFullyQualifiedRedirectUrl="true" executionTimeout="1200" />

2、扩大代理类的超时限制，默认是90秒
YourWebService yws = new YourWebService();
yws.Timeout = 1200000; //20分钟

3、IIS属性-网站 连接超时时间 1200秒