https://msdn.microsoft.com/en-us/library/ms366723.aspx
Compilation Output
When your code is compiled, the resulting assemblies are cached in a folder on the server. This folder requires appropriate permissions so that your code compiles and runs correctly. You can configure both the compilation folder location and the permissions under which your code compiles and operates.
Compilation Folder Location
By default, when you compile a Web application the compiled code is placed in the Temporary ASP.NET Files folder. This folder is a subdirectory of the location where you installed the .NET framework. Typically, the location is the following:
%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files
Compilation Folder Required Permissions
The .NET installation process creates the Temporary ASP.NET Files folder and assigns access permissions to the ASP.NET local user account, which has the high-trust permissions needed to access your compiled code. If you modify your configuration or account settings, you must make sure that the account you use has high-trust permissions to the Temporary ASP.NET Files folder. For additional details, see How to: Run the Worker Process Under a User Account.
Compilation Folder Configurability
ASP.NET creates a discrete subfolder under the Temporary ASP.NET File folder for each application. You can configure the root location using the tempDirectory attribute of the compilation section of the configuration file. This optional attribute enables you to specify the directory to use for temporary file storage during compilation. The default is an empty string (""). In the case of an empty string, and if the current process has the required access permissions, the files are stored in the following directory:
%FrameworkInstallLocation%\Temporary ASP.NET Files
For more information, see compilation Element (ASP.NET Settings Schema) and the TempDirectory property of the CompilationSection.
This compiled assembly is saved in the folder %WINDIR%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
, although the location of this folder can be customized via the <pages>
element in Web.config
.
Because the assembly is saved to disk, it does not need to be recompiled on subsequent requests to the same page.