asp.net - "Temporary ASP.NET Files"文件夹有什么用?

标签 asp.net caching

我在 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files 中发现了此文件夹,并且有几个问题。

  • ASP.NET 使用此文件夹做什么?此处存储什么类型的文件?
  • 文件如何存储在此处以及何时更新?
  • 该文件夹是否需要任何维护?

最佳答案

这些就是所谓的卷影复制文件夹。

简单地说......我是认真的:

When ASP.NET runs your app for the first time, it copies any assemblies found in the /bin folder, copies any source code files (found for example in the App_Code folder) and parses your aspx, ascx files to c# source files. ASP.NET then builds/compiles all this code into a runnable application.

这样做的一个优点是,它可以防止 .NET 程序集 DLL 的#(在/bin 文件夹中)被 ASP.NET 工作进程锁定,从而无法更新。

ASP.NET 监视您网站中的文件更改,并在必要时重新开始整个过程​​。

理论上,该文件夹不需要任何维护,但有时,只有极少数情况下您可能需要删除内容。也就是说,我在一家托管公司工作,我们在每个共享服务器上运行多达 1200 个站点,而且我已经很多年没有在这 250 台左右的机器上接触过这个文件夹了。

MSDN 文章 Understanding ASP.NET Dynamic Compilation 对此进行了概述。

关于asp.net - "Temporary ASP.NET Files"文件夹有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/450831/

相关文章:

c# - 更新面板触发器 : Could not find an event named 'OnRowCommand'

asp.net - Visual Studio 2019 - 不兼容找不到此项目类型所基于的应用程序

caching - RSS Feed生成器使用 Varnish 进行缓存

c# - .NET Core Web 应用程序可以使用 .NET Framework 类库吗?

c# - 如何配置 Fluent NHibernate 以将查询输出到 Trace 或 Debug 而不是控制台?

asp.net - 如何在 asp.net BundleConfig 中忽略特定包以进行优化

php - memcached 是关于时间的吗?

caching - 如何编写最能利用 CPU 缓存来提高性能的代码?

android - 使用 Google 的 ImageWorker 在 ListView 中加载图像导致 java.lang.RuntimeException

swift - 不能为 Swift 使用 Cache 库的 HybridCache