Sideway
output.to from Sideway
Draft for Information Only

Content

File Handling During ASP.NET Precompilation
 Compiled Files
 .compiled Files
 Updates to Deployed Web Sites
 See Also
   Tasks
   Concepts
 Sources and References

File Handling During ASP.NET Precompilation

When you precompile a site for deployment, ASP.NET creates a layout—a structure that contains the compiler output. This topic describes how files are handled during precompilation and describes the layout structure and contents.

You can precompile both source code (any file that produces an assembly, including program code and resources) and markup (.aspx files), or only source code. For details, see ASP.NET Web Site Precompilation Overview.

Compiled Files

The precompilation process performs actions on various types of files in an ASP.NET Web application. Files are treated differently depending on whether the application is being precompiled for deployment only or if it is being precompiled for deployment and update.

NoteNote

Precompiling a site for deployment only or for deployment and update does not preserve file access control lists (ACLs) on target files and subdirectories. For example, if you have previously precompiled a site and deployed it to a target location, changed a file's ACL, and then precompiled and deployed the site again, the ACL change will be lost.

The following table describes the different file types and the actions taken on them if the application is being precompiled for deployment only.

File types Precompilation action Output location

.aspx, ascx, .master

Generates assemblies and a .compiled file that points to the assembly. The original file is left in place as a placeholder for fulfilling requests.

Assemblies and .compiled files are written to the Bin folder. Pages (.aspx files, with content stripped) are left in their original locations.

.asmx, .ashx

Generates assemblies. The original file is left in place as a placeholder for fulfilling requests.

Bin folder

Files in the App_Code folder

Generates one or more assemblies (depending on Web.config settings).

NoteNote
Static content in the App_Code folder is not copied to the target folder.

Bin folder

.cs or .vb files not in App_Code folder

Compiles with the page or resource that depends on it.

Bin folder

Existing .dll files in Bin folder.

Copies files as is.

Bin folder

Resources (.resx) files

For .resx files found in the App_LocalResources or App_GlobalResources folders, generates an assembly or assemblies and a culture structure.

Bin folder

Files in the App_Themes folder and subfolders

Generates assemblies in target and .compiled files that point to the assemblies.

Bin

Static files (.htm, .html, .js, graphics files, and so on)

Copies files as is.

Same structure as in source.

Browser definition files

Copies files as is.

NoteNote
Browser information is inherited from machine-level configuration files, and may therefore behave differently on the target server.

App_Browsers

Dependent projects

Generates the output of the dependent project into an assembly.

Bin folder

Web.config files

Copies files as is.

Same structure as in source.

Global.asax files

Compiles into assembly.

Bin folder

The following table describes the different file types and the actions taken on them if the application is being precompiled for deployment and update.

File types Precompilation action Output location

.aspx, ascx, .master

Generates assemblies for files with code-behind class files and a .compiled file that points to the assembly. Single-file versions of these files are copied as is to the target.

Assemblies and .compiled files are written to the Bin folder.

.asmx, .ashx

Copies files as is without compilation.

Same structure as in source.

Files in the App_Code folder

Generates one or more assemblies (depending on Web.config settings).

NoteNote
Static content in the App_Code folder is not copied to the target folder.

Bin folder

.cs or .vb files not in App_Code folder

Compiles with the page or resource that depends on it.

Bin folder

Existing .dll files in Bin folder.

Copies files as is.

Bin folder

Resources (.resx) files

For .resx files in the App_GlobalResources folders, generates an assembly or assemblies and a culture structure.

For .resx files in the App_LocalResources folders, copies files as is to the App_LocalResources folder of the output location.

Assemblies are placed in the Bin folder

Files in the App_Themes folder and subfolders

Copies files as is.

Same structure as in source.

Static files (.htm, .html, .js, graphics files, and so on)

Copies files as is.

Same structure as in source.

Browser definition files

Copies files as is.

NoteNote
Browser information is inherited from machine-level configuration files, and may therefore behave differently on the target server.

App_Browsers

Dependent projects

Generates the output of the dependent project into an assembly.

Bin folder

Web.config files

Copies files as is.

Same structure as in source.

Global.asax files

Compiles into assembly.

Bin folder

.compiled Files

For executable files in an ASP.NET Web application, the compiler assemblies and files with the .compiled file name extension. The assembly name is generated by the compiler. The .compiled file does not contain executable code. Instead, it contains only the information that ASP.NET needs to find the appropriate assembly.

After the precompiled application is deployed, ASP.NET uses the assemblies in the Bin folder to process requests. The precompilation output includes .aspx or .asmx files as placeholders for pages. The placeholder files contain no code. They exist only to provide a way to invoke ASP.NET for a specific page request and so that file permissions can be set to restrict access to the pages.

Updates to Deployed Web Sites

After deploying a precompiled Web site, you can make limited changes to the files in the site. The following table describes the effect of different types of changes.

File type Changes Allowed (Deployment Only) Changes Allowed (Deployment and Update)

Static files (.htm, .html, .js, graphics files, and so on)

Static files can be changed, removed, or added. If an ASP.NET Web page refers to pages or page elements that are changed or removed, errors might occur.

Static files can be changed, removed, or added. If an ASP.NET Web page refers to pages or page elements that are changed or removed, errors might occur.

.aspx file

No changes are allowed to existing pages. No new .aspx files can be added.

You can change the layout of .aspx files and add elements that do not require code, such as HTML elements and ASP.NET server controls without event handlers. You can also add new .aspx files, which will be compiled normally on first request.

.skin files

Changes and new .skin files are ignored.

Changes and new .skin files are allowed.

Web.config files

Changes are allowed that affect the compilation of .aspx files. Compilation options for debugging or batching are ignored.

No changes to profile properties or provider elements are allowed.

Changes are allowed if they do not affect site or page compilation, including compiler settings, trust levels, and globalization. Changes that affect compilation or that change behavior in compiled pages are ignored or might in some instances generate errors. Other changes are allowed.

Browser definitions

Changes and new files allowed.

Changes and new files allowed.

Assemblies compiled from resource (.resx) files

New resource assembly files can be added for both global and local resources.

New resource assembly files can be added for both global and local resources.

See Also

Tasks

How to: Precompile ASP.NET Web Sites for Deployment

Concepts

ASP.NET Web Site Precompilation Overview

Sources and References

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

©sideway

ID: 211100023 Last Updated: 11/23/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

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 224

Software

Application 213

Digitization 32

Latex 52

Manim 204

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 33

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