IIS托管的WCF客户端代理导致OutOfMemoryExceptions [英] IIS hosted WCF client proxy causing OutOfMemoryExceptions

查看:89
本文介绍了IIS托管的WCF客户端代理导致OutOfMemoryExceptions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我们有一个IIS托管的应用程序,该应用程序具有basicHttpBinding客户端,该客户端使用第3方后端系统公开的服务.请求此服务可能返回巨大的响应消息(超过100MB).这些消息通常是包裹在肥皂信封中的大型xml字符串.

We have an IIS hosted application which has a basicHttpBinding client that consumes a service exposed by a 3rd party backend system. Requests this service might return huge response messages (over 100MB). These messages are generally large xml strings wrapped in a soap envelope.

我们的问题是,在反序列化响应时,当响应接近100MB时,我们会收到OutOfMemoryExceptions.因OutOfMemoryExceptions而失败.

Our problem is that while deserializing the responses we get OutOfMemoryExceptions when the response approaches 100MB…  deserialization seams to work fine while running integration unit tests on our dev boxes, while when we deploy the application to IIS the same requests towards the backend service fail with OutOfMemoryExceptions.

有什么方法可以配置IIS以允许更多的内存使用,或者有什么方法可以在反序列化肥皂消息时防止OutOfMemoryException?

Is there any way we can configure IIS to allow for more memory usage or is there any way to prevent OutOfMemoryException while deserialising the soap message?

推荐答案

IIS的内存使用量与我所阅读的内容限制在2点之间.第一个是分配给承载您的应用程序的应用程序池的限制.可通过IIS中的应用程序池"上的设置轻松调整此值.第二个约束是ASP.NET的计算机内存限制.不知道它叫什么,但我相信此设置存在于machine.config中.
IIS memory usage is constrained at 2 points from what I've read. The first is the limit asssigned to the Application Pool that hosts your application. This value is easily adjustible via settings on the Application Pool in IIS. The second constraint is the machine memory limit for ASP.NET. Not sure what it's called, but I believe this setting lives in the machine.config.


这篇关于IIS托管的WCF客户端代理导致OutOfMemoryExceptions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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