"超出内存"在调用Web服务异常 [英] "Out of memory" exception on call to web service

查看:182
本文介绍了"超出内存"在调用Web服务异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个调用.NET的DLL,这反过来调用Web服务的ASP.NET Web应用程序。 Web服务调用抛出异常:

I have an ASP.NET web application that calls a .NET DLL, that in turn calls a web service. The web service call is throwing an exception:

无法生成临时类
  (结果= 1)。错误CS0001:内部
  编译器错误(0xc00000fd)错误
  CS0003:内存

Unable to generate a temporary class (result=1). error CS0001: Internal compiler error (0xc00000fd) error CS0003: Out of memory

堆栈跟踪:在
  System.Xml.Serialization.Compiler.Compile(大会
  父,字符串NS,
  XmlSerializerCompilerParameters
  xmlParameters,证据证据)

  在
  System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping []
  xmlMappings,类型[]类型,字符串
  DefaultNamespace的,证据证据,
  XmlSerializerCompilerParameters
  参数,装配组装,
  哈希表程序集)在
  System.Xml.Serialization.TempAssembly..ctor(XmlMapping []
  xmlMappings,类型[]类型,字符串
  DefaultNamespace的,字符串的位置,
  证据证据)在
  System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping []
  映射,型型)在
  System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping []
  映射,型型)在
  System.Web.Services.Protocols.SoapClientType..ctor(类型
  型)在
  System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

Stack Trace: at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type) at System.Web.Services.Protocols.SoapClientType..ctor(Type type) at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

我应该指出,这是我第一次执行code的特定位这台电脑上(我最近做了一个Windows格式化/重新安装) - 这让我觉得这是环境的问题(相同的应用程序运行在我们的测试和生产服务器)的罚款。但我难倒事业。

I should mention that this is the first time I have executed this particular bit of code on this PC (I recently did a Windows reformat/reinstall) -- which makes me think it is a problem with the environment (the same application runs fine on our test and production servers). But I'm stumped as to the cause.


一些额外的细节来回答后续问题:

Some additional details to answer follow-up questions:


  • 这是一个真正的PC(而不是虚拟机)。

  • 我在IIS 7上运行.NET 3.5我们的生产服务器IIS 6,但它已在IIS 7之前,工作正常。

  • 的PC有2 GB的RAM,用大量的免费的。

  • 我并没有改变任何设置的Machine.config,也没有任何相关的流程模型,汇总,内存使用情况等方面的web.config设置。

  • 本地IIS_IUSRS组具有读/写权限的临时ASP.NET文件文件夹中。

  • 我检查应用程序池设置:私有内存和虚拟内存设置为0(无限制)

工作进程的内存使用:


  • 我回收工作进程得到一个干净的石板,然后在应用程序中打一个ASP.NET页面...任务管理器显示使用22 MB。

  • 我然后打,使Web服务调用和内存使用率激增到约150 MB,各级关,然后我得到的异常。
  • 事件

推荐答案

好吧,我不知道确切的为什么这个工作(这是令人沮丧的),但我没有拿出东西..

Well, I'm not sure exactly why this worked (which is frustrating), but I did come up with something...

我的previous安装Windows的是32位的,但是当我最近重建我的电脑,我与64位版本了。所以,我改变了启用32位应用程序在IIS上我的应用程序池设置为True,一切似乎现在的工作很好。

My previous install of Windows was 32-bit, but when I rebuilt my PC recently, I went with the 64-bit version. So, I changed the "Enable 32-Bit Applications" setting on my application pool in IIS to "True", and everything seems to work fine now.

DLL和网站本身被配置为编译为任何CPU,因此他们不应该造成Win64上的任何问题。和走出内存错误还是有点困扰(和无益的)。如果任何人有任何想法,你会得到公认之分。

The DLL and the web site itself are configured to compile as "Any CPU", so they shouldn't have caused any problems on Win64. And the "out of memory" error is still a bit perplexing (and unhelpful). If anyone has any ideas, you get the "accepted" points.

这篇关于"超出内存"在调用Web服务异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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