Iis Windows Server Shown After Uploading Website
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Get publish settings from IIS and import into Visual Studio
You tin use the Publish tool to import publish settings and then deploy your app. In this article, we utilise publish settings for IIS.
These steps use to ASP.NET and ASP.NET Core web applications.
Note
A publish settings file (*.publishsettings) is different than a publishing contour (*.pubxml). A publish settings file is created in IIS, so it can exist imported into Visual Studio. Visual Studio creates the publishing profile.
Prerequisites
-
Visual Studio installed with the ASP.NET and spider web development workload. If yous've already installed Visual Studio:
- Install the latest updates in Visual Studio by selecting Assistance > Cheque for Updates.
- Add the workload by selecting Tools > Get Tools and Features.
-
On your server, yous must be running Windows Server 2012, Windows Server 2016, or Windows Server 2019, and you lot must take the IIS Spider web Server role correctly installed (required to generate the publish settings file (*.publishsettings)). Either ASP.NET four.5 or ASP.NET Core must also exist installed on the server.
-
To fix ASP.NET Cadre, see Host ASP.NET Cadre on Windows with IIS. For ASP.NET Core, make sure y'all configure the Application Pool to use No Managed Code, every bit described in the article.
-
To ready ASP.NET 4.five, see IIS 8.0 Using ASP.Net 3.v and ASP.Cyberspace 4.5.
Note
IIS on Windows does not support generating the publish settings. You can, even so, still publish to IIS using the Publish tool in Visual Studio.
-
Install and configure Web Deploy on Windows Server
Web Deploy 3.6 for Hosting Servers provides boosted configuration features that enable the creation of the publish settings file from the UI.
The Spider web Platform Installer for IIS allows installation of version 3.half dozen, not 4.0, so that is the version we recommend in this article.
-
If you take Web Deploy already installed on Windows Server, uninstall it using Control Panel > Programs > Uninstall a Program.
-
Next, install Web Deploy 3.6 for Hosting Servers on Windows Server.
To install Web Deploy for Hosting Servers, use the Web Platform Installer (WebPI). (To find the Web Platform Installer link from IIS, select IIS in the left pane of Server Managing director. In the server pane, right-click the server and select Internet Information Services (IIS) Manager. Then use the Go New Web Platform Components link in the Deportment window.) You can likewise obtain the Web Platform Installer (WebPI) from downloads.
In the Spider web Platform Installer, you discover Web Deploy three.6 for Hosting Servers in the Applications tab.
-
If y'all did non already install IIS Management Scripts and Tools, install information technology now.
Get to Select server roles > Spider web Server (IIS) > Direction Tools, and so select the IIS Management Scripts and Tools role, click Next, and then install the role.
The scripts and tools are required to enable the generation of the publish settings file.
-
(Optional) Verify that Web Deploy is running correctly by opening Control Panel > System and Security > Administrative Tools > Services, and then make sure that:
-
Web Deployment Agent Service is running (the service name is unlike in older versions).
-
Web Management Service is running.
If ane of the agent services is not running, restart the Web Deployment Agent Service.
If the Spider web Deployment Amanuensis Service is not nowadays at all, become to Control Panel > Programs > Uninstall a program, find Microsoft Web Deploy <version>. Choose to Change the installation and make certain that y'all cull Volition exist installed to the local hard drive for the Web Deploy components. Complete the change installation steps.
-
Create the publish settings file in IIS on Windows Server
-
Shut and reopen the IIS Management Console to bear witness updated configuration options in the UI.
-
In IIS, correct-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 console, the output shows that admission rights are granted to the specified user, and that a file with a .publishsettings file extension has been generated in the location shown in the dialog box.
<?xml version="i.0" encoding="utf-8"?> <publishData> <publishProfile publishUrl="https://myhostname:8172/msdeploy.axd" msdeploySite="Default Web Site" destinationAppUrl="http://myhostname:lxxx/" mySQLDBConnectionString="" SQLServerDBConnectionString="" profileName="Default Settings" publishMethod="MSDeploy" userName="myhostname\myusername" /> </publishData>
Depending on your Windows Server and IIS configuration, you see unlike values in the XML file. Hither are a few details about the values that you run into:
-
The msdeploy.axd file referenced in the
publishUrl
attribute is a dynamically generated HTTP handler file for Web Deploy. (For testing purposes,http://myhostname:8172
mostly works as well.) -
The
publishUrl
port is fix to port 8172, which is the default for Web Deploy. -
The
destinationAppUrl
port is ready to port fourscore, which is the default for IIS. -
If, in later steps, you are unable to connect to the remote host from Visual Studio using the host name, examination the server's IP address in place of the host proper name.
Note
If you are publishing to IIS running on an Azure VM, you must open an inbound port for Spider web Deploy and IIS in the Network Security group. For detailed information, see Open up ports to a virtual machine.
-
-
Copy this file to the computer where you lot are running Visual Studio.
Import the publish settings in Visual Studio and deploy
-
On the calculator where you lot have the ASP.NET project open in Visual Studio, right-click the project in Solution Explorer, and choose Publish.
If you have previously configured any publishing profiles, the Publish pane appears. Click New or Create new profile.
-
Select the option to import a contour.
In the Publish dialog box, click Import Profile.
In the Pick a publish target dialog box, click Import Profile.
-
Navigate to the location of the publish settings file that you created in the previous section.
-
In the Import Publish Settings File dialog, navigate to and select the contour that yous created in the previous section, and click Open up.
Click Finish to salve the publishing profile, and then click Publish.
Visual Studio begins the deployment process, and the Output window shows progress and results.
If you lot become an any deployment errors, click Edit to edit settings. Alter settings and click Validate to test new settings. If the host proper noun is not found, try the IP address instead of the host name in the Server and Destination URL fields.
Visual Studio begins the deployment procedure, and the Output window shows progress and results.
If you lot go an any deployment errors, click Settings to edit settings. Modify settings and click Validate to test new settings. If the host name is not constitute, attempt the IP accost instead of the host name in the Server and Destination URL fields.
After the app deploys successfully, it should offset automatically.
Mutual issues
Offset, check the Output window in Visual Studio for status data, and check your mistake messages. In addition:
- If you lot tin't connect to the host using the host name, endeavor the IP address instead.
- Make sure the required ports are open on the remote server.
- For ASP.Net Cadre, in IIS you need to make certain that the Application puddle field for the DefaultAppPool is set to No Managed Code.
- Verify that the version of ASP.NET used in your app is the same every bit the version you installed on the server. For your app, you can view and ready the version in the Properties page. To set the app to a different version, that version must be installed.
- If the app tried to open, but you see a certificate alarm, choose to trust the site. If you already closed the alert, you tin can edit the *.pubxml file in your project and add the following element:
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
. This setting is for testing merely! - If the app does not kickoff from Visual Studio, showtime the app in IIS to test that it deployed correctly.
Feedback
Submit and view feedback for
thortonwithic1993.blogspot.com
Source: https://docs.microsoft.com/en-us/visualstudio/deployment/tutorial-import-publish-settings-iis
0 Response to "Iis Windows Server Shown After Uploading Website"
Post a Comment