Sideway from Sideway
Draft for Information Only


How to: Precompile ASP.NET Web Sites
  To precompile an ASP.NET Web site in place
 See Also
   Other Resources
 Source and Reference

How to: Precompile ASP.NET Web Sites

Precompiling an ASP.NET Web site provides faster initial response time for users since pages do not have to be compiled the first time they are requested. This is particularly useful for large Web sites that are updated frequently.

The procedure in this topic uses the switches and parameters of the ASP.NET Compilation Tool (Aspnet_compiler.exe). For more information about this tool, see ASP.NET Compilation Tool (Aspnet_compiler.exe).

For more information about precompilation, see ASP.NET Web Site Precompilation.

To precompile an ASP.NET Web site in place

  1. Open a command window and navigate to the folder containing the .NET Framework.

    The .NET Framework is installed in the following location.

  2. Run the aspnet_compiler command by typing the following at a command prompt.

    aspnet_compiler -v /virtualPath

    The virtualPath parameter indicates the Internet Information Services (IIS) virtual path of your Web site.

    If your Web site is not an IIS application, and therefore has no entry in the IIS metabase, type the following command at a command prompt.

    aspnet_compiler -p physicalOrRelativePath -v /

    In this case, the physicalOrRelativePath parameter refers to the fully qualified directory path in which the Web site files are located, or a path relative to the current directory. The period (.) operator is allowed in the physicalOrRelativePath parameter. The -v switch specifies a root that the compiler will use to resolve application-root references (for example, with the tilde (~) operator). When you specify the value / for the -v switch, the compiler will resolve the paths by using the physical path as the root.

See Also


How to: Precompile ASP.NET Web Sites for Deployment

Other Resources

ASP.NET Performance

Source and Reference


ID: 211100026 Last Updated: 11/26/2021 Revision: 0 Ref:



  1. Active Server Pages,  ,
  2. ASP Overview,  ,
  3. ASP Best Practices,  ,
  4. ASP Built-in Objects,  ,
  5. Response Object,  ,
  6. Request Object,  ,
  7. Server Object (IIS),  ,
  8. Application Object (IIS),  ,
  9. Session Object (IIS),  ,
  10. ASPError Object,  ,
  11. ObjectContext Object (IIS),  ,
  12. Debugging Global.asa Files,  ,
  13. How to: Debug Global.asa files,  ,
  14. Calling COM Components from ASP Pages,  ,
  15. IIS ASP Scripting Reference,  ,
  16. ASP Keywords,  ,
  17. Creating Simple ASP Pages,  ,
  18. Including Files in ASP Applications,  ,
  19. ASP Overview,  ,
  20. FileSystemObject Object,  ,
  21.,  , ADO Object Model
  22. ADO Fundamentals,  ,

Home 5






Hobbies 8


Chinese 1097

English 337

Reference 68


Hardware 160


Application 205

Digitization 25

Latex 35

Manim 203

Numeric 19


Web 285

Unicode 504


CSS 65

SVG 46new


OS 422

DeskTop 7

Python 71new



Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 32new

Coordinate Geometry 2

Calculus 67

Complex Analysis 21


Tables 8


Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5


Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1

Copyright © 2000-2022 Sideway . All rights reserved Disclaimers last modified on 06 September 2019