Sideway
output.to from Sideway
Draft for Information Only

Content

How to: Precompile ASP.NET Web Sites for Deployment
  To precompile an ASP.NET Web site for deployment
  To precompile an ASP.NET Web site for deployment and update
 See Also
   Tasks
   Other Resources
 Source and Reference

How to: Precompile ASP.NET Web Sites for Deployment

When you precompile an ASP.NET Web site for deployment you create a layout containing assemblies and other information that you can then copy to a production server. A Web site that is precompiled for deployment gives you the ability to create a compiled version of the site that can be deployed to a production server without source code.

You can choose to precompile either code and .aspx pages, or just the code. If you precompile only the code, you can update the user interface of the site without having to recompile the entire site.

The procedures in this topic use 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 for deployment

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

    The .NET Framework is installed in the following location.

    %windir%\Microsoft.NET\Framework\version
    
  2. Run the aspnet_compiler command by typing the following at a command prompt, specifying the source as either a virtual path or physical path and the target folder for the compiled Web site.

    aspnet_compiler -v virtualPathtargetPath
    

    If your Web site is not an Internet Information Services (IIS) application and therefore has no entry in the IIS metabase, used the following value for the -v switch.

    aspnet_compiler -p physicalOrRelativePath -v / targetPath
    

    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 of / for the -v switch the compiler will resolve the paths using the physical path as the root.

    The targetPath parameter is a physical path to the destination directory

To precompile an ASP.NET Web site for deployment and update

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

    The .NET Framework is installed in the following location.

    %windir%\Microsoft.NET\Framework\version
    
  2. Run the aspnet_compiler command by typing the following at a command prompt, specifying the source as either a virtual path or physical path, the target folder for the compiled Web site, and the -u switch indicating you want to compile the site for deployment and update.

    aspnet_compiler -p physicalOrRelativePath -v / targetPath -u
    

See Also

Tasks

How to: Precompile ASP.NET Web Sites

Other Resources

ASP.NET Web Site Precompilation

Source and Reference

https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-3.0/ms227976(v=vs.85)

©sideway

ID: 211100025 Last Updated: 11/25/2021 Revision: 0 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 337

Reference 68

Computer

Hardware 160

Software

Application 205

Digitization 25

Latex 35

Manim 203

Numeric 19

Programming

Web 285

Unicode 504

HTML 65

CSS 65

SVG 46new

ASP.NET 270

OS 422

DeskTop 7

Python 71new

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 32new

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

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