Publish Web Dialog Box

The Publish Web dialog box enables you to deploy a Web application by using the one-click publish feature of Visual Studio. One-click publish uses the IIS Web Deployment Tool (Web Deploy) to deploy a Web application project to IIS on the local computer or a remote server.

This dialog box lets you create multiple profiles that can each have different settings for how to deploy the application. You can select a profile and then use the dialog box to start the deployment process. After you have created a profile, you can use the Publish button on the one-click publish toolbar to start the deployment process.

For more information about one-click publish, see ASP.NET Deployment Content Map.

To access this dialog box

  1. In Visual Studio, open a Web application project.

    Note

    This dialog box cannot be used with a Web site project. For information about the differences between Web application projects and Web site projects, see Web Application Projects versus Web Site Projects.

  2. Right click the project name in Solution Explorer and then click Publish. You can also use the Publish button on the one-click publish toolbar.

UI Elements

  • Publish profile
    Specifies the name of the profile that you are creating settings for.

    To create a new profile, enter a name. To save the current profile, click the Save button. (When you create a new profile, you have to move the cursor out of the Publish profile field in order to enable the Save button.) To rename or delete an existing profile, select it from the drop-down list and click the Rename or Delete button.

  • Build configuration
    Indicates the active configuration (which is the configuration that will be published if you click Publish). The settings in the dialog box apply only to the active configuration and to the selected profile.

    To change the active configuration or create new configurations, select Configuration Manager from the Build menu.

  • Publish method
    Specifies the protocol to use when the site is published. The options in the dialog box change depending on which protocol is selected.

  • Service URL
    Specifies the location of the destination server. To publish locally, use localhost or LocalComputerName. You must have appropriate permissions to perform the deployment on the destination server. For example, you must have permission to write files to the destination folder or folders.

    To publish remotely through Remote Agent Service, use https://RemoteComputerName. This option is typically used to deploy a Web application inside a network (in an intranet scenario). You must have appropriate permissions to perform the deployment on the destination server.

    To publish to a hosting site using Windows Management Service, use the value that is specified by the hosting provider. You can typically use just a server name (HostedRemoteServer) or a complete URL that includes a server name, a port number, and the Web Deploy handler name (https://HostedRemoteServer:8172/MsDeploy.axd). The hosting provider can tell you the name of the server and the port number, if applicable.

  • Site/application
    Specifies the site and application name to publish.

    This value must be in the form IIS Web Site Name/IIS Application Name. For local or intranet servers, use the name of the Web site and application as specified in IIS Manager (for example, "Default Web Site/MyApp"). To publish remotely through Windows Management Service, you typically enter the value that is specified by your hosting provider, which can consist of a domain (for example, "contoso.com") or a domain and application name (for example, "contoso.com/blog").

  • Physical path
    Specifies the physical path of the Web application files on the destination server. This information applies only when IIS settings are included in the deployment package. (The option to include IIS settings is specified on the Package/Publish Web tab of the project Properties window.)

  • Leave extra files on destination (do not delete)
    Specifies that the publishing process should not delete existing files in the destination location whose names do not match the names of files that are being deployed.

    Warning

    If you unselect this check box, the publish process removes any files on the destination server whose names do not match the names of files that are being deployed.

  • Allow untrusted certificate
    Specifies that untrusted certificates can be used. You should only select this option when you are publishing to a server that you know can be trusted and you are certain that you have entered the correct domain name.

  • User name
    Specifies the user name for logging into the destination server, if required. (Credentials are required if you select Web Deploy for the Publish method.) The deployment process logs onto the destination server in order to perform the deployment. The credentials that you provide must represent a user account that has sufficient privileges to perform the deployment tasks, such as writing files, making IIS settings, and so on.

    If you are deploying to a hosting provider, the provider will specify the credentials that you require.

  • Password
    Specifies the password for logging into destination server.

  • Save Password
    Specifies whether the password is saved and appears in the text box the next time that this dialog box is opened.

See Also

Concepts

ASP.NET Deployment Content Map