Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 XML 文件(大小为 10MB~),我想在我的 WCF 服务中将其作为XmlDocument类型返回,但之前没有将其加载到内存中,因为请求此文件的人很多,所以服务器会出现OutOfMemory异常.
XmlDocument
OutOfMemory
有可能吗?
如果是 wcf,您可以使用流式传输(作为二进制数据返回),它旨在处理大数据:
详情在这里