blazor 部署iis
介绍 (Introduction)
In this article, we will learn how to deploy an ASP.NET Core hosted Blazor application with the help of IIS 10 on a Windows 10 machine. We will be using Visual Studio 2017 to publish the app and SQL Server 2014 to handle DB operations. We will also troubleshoot some of the common hosting issues for a Blazor application.
在本文中,我们将学习如何在Windows 10计算机上借助IIS 10部署ASP.NET Core托管的Blazor应用程序。 我们将使用Visual Studio 2017来发布应用程序,并使用SQL Server 2014来处理数据库操作。 我们还将解决Blazor应用程序的一些常见托管问题。
先决条件 (Prerequisites)
Please refer to my previous article, How to create a cascading DropDownList in Blazor using EF Core, to create the application that we will be deploying in this tutorial.
请参考我以前的文章, 如何使用EF Core在Blazor中创建级联的DropDownList ,以创建将在本教程中部署的应用程序。
安装.NET Core托管捆绑 (Installing .NET Core hosting bundle)
Since we are going to deploy an ASP.NET Core hosted Blazor application, the first step is to install the .NET Core hosting bundle in our machine.
由于我们将部署ASP.NET Core托管的Blazor应用程序,因此第一步是在计算机中安装.NET Core托管软件包。
Follow the below steps to download the .NET Core hosting bundle:
请按照以下步骤下载.NET Core托管捆绑包:
第1步 (Step 1)
Open https://www.microsoft.com/net/download/all
打开https://www.microsoft.com/net/download/all
第2步 (Step 2)
Select the latest non-preview .NET Core runtime from the list. For this tutorial, we will select .NET Core Runtime 2.0.7.
从列表中选择最新的非预览版.NET Core运行时。 对于本教程,我们将选择.NET Core Runtime 2.0.7。
Refer to the image below:
请参考下图:
第三步 (Step 3)
On the .NET Core runtime download page, scroll down to Windows s