We have a couple of .asmx soap web services that handle communication between our web gui and our backend app server. Recently we went from running our Visual Studio 2010 solution in the built in web server to running it through IIS 7.5. Right away we started experiencing very slow response times and started getting various exception that we weren't seeing before, like timeouts & serialization errors in our xml's.
我们有两个.asmx soap web服务,用于处理web gui和后端应用服务器之间的通信。最近,我们从在内置的web服务器中运行Visual Studio 2010解决方案到在IIS 7.5中运行它。我们立即开始经历非常慢的响应时间,并开始出现我们以前没有看到过的各种异常,比如xml中的超时和序列化错误。
We've tried to narrow the problem down to a minimum, but are short a solution so now we're throwing it "out there" to see if anyone have experienced the same or maybe have a solution.
我们试图把问题缩小到最低限度,但我们缺乏一个解决方案,所以现在我们把它“扔到一边”,看看是否有人经历过同样的问题,或者可能有一个解决方案。
PS. We know that .asmx web services are outdated, but we can't convert the services to WCF at this time. DS.
我们知道。asmx web服务已经过时了,但是我们现在不能将服务转换为WCF。DS。
This code will reproduce the error:
此代码将重现错误:
[WebMethod]
public string DebugGetAuditTrail()
{
const string data = "Some random text that is not very interesting. ";
StringBuilder lotsOfData = new StringBuilder();
for(int counter=0; counter<100000; counter++)
{
lotsOfData.Append(data);
}
return lotsOfData.ToString();
}
Our web.config states:
我们的网络。配置:
<httpRuntime executionTimeout="600" requestValidationMode="2.0" maxRequestLength="1400000"/>
Thanks in advance!
提前谢谢!
1 个解决方案
#1
0
Ideally it is not advisable to send huge amount of data using web-service. However, to deal with such situations, the best way is to break apart the data in small packets.
理想情况下,不建议使用web服务发送大量数据。但是,要处理这种情况,最好的方法是将数据分成小的包。
What you can do is, create a header which indexes the data packets. Once the header is received, configure the server to send the remaining part of data.
您可以做的是,创建一个索引数据包的头。收到报头后,配置服务器以发送剩余的数据。
#1
0
Ideally it is not advisable to send huge amount of data using web-service. However, to deal with such situations, the best way is to break apart the data in small packets.
理想情况下,不建议使用web服务发送大量数据。但是,要处理这种情况,最好的方法是将数据分成小的包。
What you can do is, create a header which indexes the data packets. Once the header is received, configure the server to send the remaining part of data.
您可以做的是,创建一个索引数据包的头。收到报头后,配置服务器以发送剩余的数据。