什么是“临时 ASP.NET 文件"?文件夹? [英] What is the "Temporary ASP.NET Files" folder for?

查看:27
本文介绍了什么是“临时 ASP.NET 文件"?文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files 中发现了这个文件夹并且有几个问题.

I've discovered this folder in C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files and have a few questions.

  • ASP.NET 将此文件夹用于什么用途,以及此处存储哪些类型的文件?
  • 文件如何存储在此处,何时更新?
  • 文件夹是否需要任何形式的维护?

推荐答案

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

These are what's known as Shadow Copy Folders.

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

Simplistically....and I really mean it:

当 ASP.NET 运行您的应用程序时第一次,它复制任何程序集在/bin 文件夹中找到,复制任何源代码文件(例如找到在 App_Code 文件夹中)并解析你的 aspx, ascx 文件到 c# 源文件.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 工作进程锁定,从而无法更新.

One advantage of doing this is that it prevents the possibility of .NET assembly DLL's #(in the /bin folder) becoming locked by the ASP.NET worker process and thus not updatable.

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

ASP.NET watches for file changes in your website and will if necessary begin the whole process all over again.

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

Theoretically the folder shouldn't need any maintenance, but from time to time, and only very rarely you may need to delete contents. That said, I work for a hosting company, we run up to 1200 sites per shared server and I haven't had to touch this folder on any of the 250 or so machines for years.

这在 MSDN 文章 了解 ASP.NET 动态编译

This is outlined in the MSDN article Understanding ASP.NET Dynamic Compilation

这篇关于什么是“临时 ASP.NET 文件"?文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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