Temporary ASP. NET Files Inquiry

Source: Internet
Author: User

The brothers who understand the. NET platform know that. NET is also dynamically compiled
That is, we often say that the build DLL is just the middle code
And in the first request of the web is the real meaning of the compilation generated binary code
That's why the first time you've compiled a Web page, it's a bit slow.

All right, that's a little gossip.
Today a brother asked me why he developed the environment to open the compiled page more and more slowly
Here's my solution:
1. Turn off the Inetinfo.exe process
2. Turn off aspnet_wp.exe
3. Turn off the open Visual Studio
4. Clear all Files under the%systemroot%\microsoft.net\framework\versionnumber\temporary ASP.
%systemroot% refers to the path of your system's WINDOWS folder, which is generally the default C:\WINDOWS\
The overall cleanup process may be slow, depending on the size of the folder under the directory.
Once cleared, the first open will be slower, but will be quicker to open later after compilation.

Here's a detailed explanation.
When we first request, that is, the official compilation, dotnet will write some temporary files in this folder.
This I have verified, in the first request, to pay attention to the changes in the folder.
There is no such problem with deploying Web application that are already online on the server.
And in our development environment, because often to build, often the first request, so long time, this folder will become very large.
Like the project I'm working on, the size of the source and destination files is 4G, so the files written to this folder have hundreds of megabytes.
We can take a look at the assembly that was loaded after selecting the "near to process" action, under this path.

Do not know some brothers, will not think, to often manually to clear these documents, is not very troublesome?
Haha, want to save the brother, can write a batch process to do this operation.
Here, I would like to introduce another way to improve speed.
We all know that in the storage unit we can control, the speed of memory access is the fastest.
If we can put these temporary files in memory, we will multiply the speed.

1. Installing RAMDisk
2. After installation, set the TEMP directory of the debug output to the path of the memory disk, no longer using the original temporary ASP. NET files, only by modifying the Web. config file to
<compilcation debug= "True" > the general situation is like this
Modified to <compilcation debug= "true" tempdirectory= "R:\" >
Keep the original property, add a new tempdirectory to specify the path of the memory disk
Practice tests can take a time gap to an order of magnitude.
Extended read: http://msdn.microsoft.com/en-us/library/ms366723.aspx

Temporary ASP. NET Files Inquiry

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.