| title | Create publish settings in IIS |
|---|---|
| author | ghogen |
| description | Learn how to create a .publishsettings file in IIS |
| ms.author | ghogen |
| ms.date | 10/3/2025 |
| ms.subservice | deployment |
| ms.topic | include |
-
Close and reopen the IIS Management Console to show updated configuration options in the UI.
-
In IIS, right-click the Default Web Site, choose Deploy > Configure Web Deploy Publishing.
If you don't see the Deploy menu, see the preceding section to verify that Web Deploy is running.
-
In the Configure Web Deploy Publishing dialog box, examine the settings.
-
Click Setup.
In the Results panel, the output shows that access rights are granted to the specified user, and that a file with a
.publishsettingsfile extension has been generated in the location shown in the dialog box.<?xml version="1.0" encoding="utf-8"?> <publishData> <publishProfile publishUrl="https://myhostname:8172/msdeploy.axd" msdeploySite="Default Web Site" destinationAppUrl="http://myhostname:80/" profileName="Default Settings" publishMethod="MSDeploy" userName="myhostname\myusername" /> </publishData>
Depending on your Windows Server and IIS configuration, you see different values in the XML file. Here are a few details about the values that you see:
-
The msdeploy.axd file referenced in the
publishUrlattribute is a dynamically generated HTTP handler file for Web Deploy. (For testing purposes,http://myhostname:8172generally works as well.) -
The
publishUrlport is set to port 8172, which is the default for Web Deploy. -
The
destinationAppUrlport is set to port 80, which is the default for IIS. -
If, in later steps, you're unable to connect to the remote host from Visual Studio using the host name, test the server's IP address in place of the host name.
[!NOTE] If you're publishing to IIS running on an Azure VM, you must open an inbound port for Web Deploy and IIS in the Network Security group. For detailed information, see Open ports to a virtual machine.
-
-
Copy this file to the computer where you're running Visual Studio.
