Publish Web Site Dialog Box

The Publish Web Site dialog box enables you to precompile and publish your Web site to a new location. The Publish Web Site utility allows you to find compile-time errors and potential errors in the Web.config file and other non-code files before deployment. Additionally, source code is removed from the site, including the markup in the .aspx files. This provides a measure of protection for your intellectual property and makes it more difficult for others to access the source code of your site. For more information about the advantages of using the Publish Web Site utility, see ASP.NET Deployment Overview. For more information about precompilation, see ASP.NET Precompilation Overview.

Alternatively, you can use the Copy Web Site tool or the Microsoft Build Engine (MSBuild) build platform for Visual Studio. MSBuild produces the same output as the Publish Web Site utility, and allows you to save the Web site to a disk location. The Copy Web Site tool does not precompile the application; therefore, your source code is copied as-is and might contain compile-time errors.

Note

The Publish Web Site utility is not available in Visual Web Developer Express Edition.

To access this dialog box

  1. In Visual Web Developer, open a Web site that you want to deploy to a new location.

  2. Click Build, and then click Publish Web Site.

Tasks

UI Elements

  • Target Location
    Specifies the output path for the precompilation process. The results of precompilation are written to the specified location, overwriting (without warning) any existing content in that location. You can specify an FTP path, HTTP path, or a physical drive location.

  • Allow this precompiled site to be updatable
    Specifies that the content of .aspx pages are not compiled into an assembly; instead, the markup is left as-is, allowing you to change HTML and client-side functionality after precompiling the Web site. Selecting this check box is equivalent to adding the -u option to the aspnet_compiler.exe command.

    For more information, see .ASP.NET Precompilation Overview.

  • Use fixed naming and single page assemblies
    Specifies that batch builds are turned off during precompilation in order to generate assemblies with fixed names. Themes and skin files will continue to be compiled to a single assembly. This option is not available for in-place compilation.

  • Enable strong naming on precompiled assemblies
    Specifies that the generated assemblies are strongly named by using a key file or key container to encode the assemblies and ensure that they have not been tampered with. After you select this check box, you can do the following:

    • Specify the location of a key file to use to sign the assemblies. If you use a key file, you can select Delay signing, which signs the assembly in two stages: first with the public key file, and then with a private key file that is specified later during a call to the aspnet_compiler.exe command.

    • Specify the location of a key container from the system's cryptographic service provider (CSP) to use to name the assemblies.

    • Specify whether to mark the assembly with the AllowPartiallyTrustedCallers property, which allows strongly named assemblies to be called by partially trusted code. Without this declaration, only fully trusted code can use such assemblies.

      Note

      Selecting this option might compromise the security of your generated assembly.

See Also

Reference

MSBuild Support, Web Site Property Pages Dialog Box

Concepts

ASP.NET Web Site Projects Deployment Overview

ASP.NET Precompilation Overview

Other Resources

MSBuild

ASP.NET Web Deployment Overview