1

我正在尝试使用来自我们第三方网络服务之一的网络方法到我的 vb.net 代码中,以使用他们的 .net API 检索信息。

当我尝试

Dim records() As WEB_API.DBRecord
records = api.GetView(guid, viewid, dbid, offset, 10000)

我从 webservice(SOAP) 得到错误说:

System.Web.Services.Protocols.SoapHeaderException: Allowed memory size of 157286400 bytes 
   exhausted (tried to allocate 10528769 bytes)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage 
     message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at comp.WEB_API.XYZ.GetView(String db_guid, Int32 view_db, Int32 space_id, Int32 offset, Int32 count)

我有什么需要解决的吗?你认为是什么原因。让我知道如何解决此问题。谢谢。

4

2 回答 2

0

尝试将内存限制增加到 150Mb 以上,或者尝试每次提取更少的记录。您获得的是 OOM,而不是第三方 API。

于 2012-05-18T05:21:59.320 回答
0

错误很可能发生在您的第三方 Web 服务上。您正在请求大量数据,但它们没有受到限制,并且内存不足。

于 2012-05-17T20:33:19.413 回答