将aspnet核心项目发布到IIS [英] Publishing aspnet core project to IIS
本文介绍了将aspnet核心项目发布到IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已通过以下命令成功生成了发布文件夹;
I have successfully generated a publish folder via following command;
dotnet publish -c Release -r win10-x64 --self-contained
这是发布文件夹中生成的exe文件。如果我运行exe文件,网站运行在localhost:5000没有问题。
但是;当我尝试将此网站放在iis上时,我有以下错误;
Here is the generated exe file in publish folder. If I run the exe file, the website runs with no problem on localhost:5000.
However; when I try to put this website on iis, I have the following error;
HTTP Error 500.19 - Internal Server Error<pre>
Error Code 0x8007000d<pre>
这是我的网络配置文件;
Here is my web config file;
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\AURORA.MvcWebUI.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 1E855145-26EA-4E34-8527-9A44CCB14290-->
你能帮帮我吗?
我尝试了什么:
我试图删除网络配置文件的每一部分但无法使其正常工作
Could you help me please?
What I have tried:
I have tried to delete each part of the web config file but could not make it work
推荐答案
在部署文件夹中创建文件夹[
Create folder [
logs
]文件夹。
重新安装aspnet核心模块解决了我的问题。
Reinstalling aspnet core module solved my problem.
>
这篇关于将aspnet核心项目发布到IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文