Asp.net

引發了“System.OutOfMemoryException”類型的異常。

  • August 26, 2013

我遇到了以下問題

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
  System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
  System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
  System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
  System.Reflection.Assembly.Load(String assemblyString) +35
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +123

[ConfigurationErrorsException: Exception of type 'System.OutOfMemoryException' was thrown.]
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11569328
  System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +485
  System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +79
  System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +337
  System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280
  System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167

[HttpException (0x80004005): Exception of type 'System.OutOfMemoryException' was thrown.]
  System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11702064
  System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
  System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4870277

我沒改程式碼?這個問題是什麼意思,正如我所見,沒有更多關於錯誤的聲明

當某些過程(例如將大量數據載入到記憶體流)並且您的系統記憶體無法儲存如此多的數據時,通常會出現此問題。嘗試通過給出命令清除臨時文件夾

開始 -> 執行 -> %temp%

引用自:https://stackoverflow.com/questions/18438281