Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 引发了“System.OutOfMemoryException”类型的异常。_Asp.net_Vb.net_Out Of Memory - Fatal编程技术网

Asp.net 引发了“System.OutOfMemoryException”类型的异常。

Asp.net 引发了“System.OutOfMemoryException”类型的异常。,asp.net,vb.net,out-of-memory,Asp.net,Vb.net,Out Of Memory,我有以下问题 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.OutOfMemoryExcepti

我有以下问题

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

我没有改变密码?这个问题是什么意思,正如我所看到的,没有更多关于错误的声明。这个问题通常发生在某些进程,例如将大量数据加载到内存流,而您的系统内存无法存储这么多数据时。尝试通过发出命令清除临时文件夹

开始->运行->温度%

在调试模式下运行

在开发和调试应用程序时,通常会将web.config文件中的debug属性设置为true并在调试模式下编译DLL。但是,在将应用程序部署到测试或生产环境之前,应该在发布模式下编译组件,并将debug属性设置为false

在调试模式下运行时,ASP.NET在许多级别上的工作方式不同。事实上,当您在调试模式下运行时,GC将允许您的对象在作用域结束之前保持更长的活动时间,因此在调试模式下运行时,您将始终看到更高的内存使用率

在调试模式下运行的另一个未实现的副作用是,不会缓存通过webresource.axd和scriptresource.axd处理程序提供的客户端脚本。这意味着每个客户端请求都必须下载任何脚本,例如ASP.NET AJAX脚本,而不是利用客户端缓存。这可能导致性能大幅下降


来源:

如果您使用的是IIS Express,请在任务栏通知区域中选择“从IIS Express显示所有应用程序”,然后选择“全部停止”


现在重新运行您的应用程序。

我刚刚重新启动了Visual Studio,并进行了IISRESET,解决了问题。

另一件要尝试的事情是

工具->选项->搜索IIS->勾选将64位版本的IIS Express用于网站和项目


在此异常开始发生之前,您在做什么?哪个事件触发了此错误。例如,插入、选择等。请尝试检查您的进程,并查看何时运行空白页,内存是否增加。检查您的系统是否有足够的内存来加载页面。看起来它在页面初始化时崩溃了。读这个。这是一篇很棒的文章!在我的临时文件夹中,只有f个文件,我不认为这是因为临时文件。感谢您的指导,它工作正常,请您提供服务器配置,以便在生产站点中修复。@Selva在生产中,它将在IIS下运行,因此您需要检查应用程序运行的应用程序池。e、 g.对于那些在Azure应用程序服务上部署项目的人,同样可以从配置刀片->常规设置->平台进行,并将其设置为64位