如何提高Web服务在asp.net中的超时时间? [英] How to increase the timeout period of web service in asp.net?

查看:172
本文介绍了如何提高Web服务在asp.net中的超时时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个Web服务是ASMX类型。而我用我的Web服务在.NET Windows应用程序。

I've created one web service which is of asmx type. And I'm using my web service in the .net windows application.

这是Web服务的Web方法接收的对象和放大器的字节数组转换;我班有在我在字符串的形式添加一个XML文件中不同属性的对象。当包含XML数据增加我的字符​​串,然后它给我的超时的错误,同时将数据发送到Web服务。

Web method from the web service receives byte array conversion of the object & object of my class having different attributes in which i'm adding one xml file in the form of the string. When my string containing xml data increases then it gives me the "Time out" error while sending data to the the web service.

如何提高网络服务的超时时间?

How to increase the timeout period of web service?

感谢。

推荐答案

您可以用不同的方式做到这一点:

you can do this in different ways:

  1. 设置在Web服务调用者超时从code(不是100%肯定,但我想我已经看到这种情况);
  2. 在Web引用的Web服务代理的构造函数设置超时;
  3. 设置超时在服务器端,web服务应用的web.config中。

在这里看到的更多详细信息第二种情况:

see here for more details on the second case:

http://msdn.microsoft.com/en-us/库/ ff647786.aspx#scalenetchapt10_topic14

和这里对后一种情况的详细信息:

and here for details on the last case:

<一个href="http://stackoverflow.com/questions/2914702/how-to-increase-the-timeout-to-a-web-service-request">How增加超时到Web服务请求?

这篇关于如何提高Web服务在asp.net中的超时时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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