简体   繁体   English

消除临时 ASP.Net 文件

[英]Eliminating temporary ASP.Net Files

How do you prevent ASP.NET from creating too many temporary files?如何防止 ASP.NET 创建太多临时文件? My website creates gigabytes of temporary files, and that overflows the main partition on the server.我的网站创建了千兆字节的临时文件,并且溢出了服务器上的主分区。 How do I prevent this from happening?我该如何防止这种情况发生?

Where are these temp files beeing generated?这些临时文件在哪里生成?

If it's in the "Temporary ASP.NET Files" folder, it's a result of your application beeing recompiled.如果它在“Temporary ASP.NET Files”文件夹中,这是您的应用程序重新编译的结果。 Checkout MSDN for more information on dynamic compilation.查看MSDN以获取有关动态编译的更多信息。 One possible solution could be to relocate the temp directory.一种可能的解决方案是重新定位临时目录。

You could try pre-compiling your site to avoid the generation of temp-files.您可以尝试预编译您的网站以避免生成临时文件。

Setup a task in the task scheduler to clean up temporary files.在任务计划程序中设置一个任务来清理临时文件。 I have no idea why this is not done by the OS (or by the creator of those files).我不知道为什么操作系统(或这些文件的创建者)没有这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM