简体   繁体   English

部署 IIS 本地主机页面

[英]Deploy IIS localhost page

I want to publish my Razor Pages app via IIS and I did all configuration on IIS Manager and the result is like that: I can't see my homepage, there is no page as you can see.我想通过 IIS 发布我的 Razor Pages 应用程序,我在 IIS 管理器上进行了所有配置,结果是这样的:我看不到我的主页,没有您可以看到的页面。 How can I fixed that我该如何解决

enter image description here在此处输入图像描述

You can follow the below steps to deploy the razor pages on iis server:您可以按照以下步骤在 iis 服务器上部署 razor 页面:

  1. Right-click on the project in Solution Explorer and select Publish.右键单击解决方案资源管理器中的项目并选择发布。
  2. In the Pick a publish target dialog, select the Folder publish option.在选择发布目标对话框中,选择文件夹发布选项。
  3. Set the Folder, Select the Publish button.设置文件夹,选择发布按钮。
  4. Download and install asp.net core hosting bundle下载并安装 asp.net 核心托管包

https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-7.0.1-windows-hosting-bundle-installer https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-7.0.1-windows-hosting-bundle-installer

  1. Open iis create website, point the folder location to the visual studio published location打开iis create website,将文件夹位置指向visual studio发布的位置

  2. Set the application pool to the no managed code将应用程序池设置为无托管代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM