zoukankan      html  css  js  c++  java
  • asp.net临时文件的重定向

    从网上搜索到下面这段文字,自己实践成功后贴出来备忘:

    Relocating Temporary ASP.NET Files

    Posted by Chris Alcock on Monday 15th October 2007 at 10:29 pm | Tagged as: .NET, ASP.NET, Development, IIS, SysAdmin

    When you first request a page from the an ASP.NET application, the .NET framework takes the ASPX file and generates code to actually execute the page. This code is then compiled by the framework and the results of the compilation are stored in the Temporary ASP.NET files directory within the framework directory (usually located in c:\windows\Microsoft.NET\Framework). When the ASPX of the compiled DLL changes this code is re-generated and recompiled.
    On a server that hosts lots of ASP.NET applications this store of temporary compiled code can occupy a considerable amount of space. On machines with a limited amount of space on their OS partition this can begin to cause problems. Thankfully the ASP.NET framework does allow the location of this directory to be specified as a custom location.
    As with most server wide settings you need to make a change to the Machine.Config (for .NET 1.1) or Machine wide web.Config (for .NET 2). The crucial part of the configuration is the Compilation element within system.web. The compilation element has an optional attribute called tempDirectory that allows a new directory location to be specified overriding the default setting of %FrameworkInstallLocation%\Temporary ASP.NET Files.

    <system.web>

       <compilation tempDirectory="d:\TempASP.NETFiles\">

          ...

       </compilation>

    </system.web>

    One thing to watch out for when making this change is the file permissions on your new Temporary ASP.NET files - copying the permissions from the original location will do the trick nicely.

  • 相关阅读:
    Nginx快速自查手册
    python——常见排序算法解析
    config、option、setting辨析
    python——append与extend
    crm——stark组件核心原理
    码,码,码不停!
    python——设计模式
    CCI_chapter 4 trees and Grapths
    题目1509:树中两个结点的最低公共祖先
    CCI_chapter 3 Stacks and Queues
  • 原文地址:https://www.cnblogs.com/webJingGao/p/2972812.html
Copyright © 2011-2022 走看看