在 IIS 服务器上托管 AspNetCore.SpaTemplates 个项目
Hosting AspNetCore.SpaTemplates Project on an IIS Server
我的公司正在使用 ASP.NET 一些工具,我想我会尝试使用 .NET Core 和 Angular。我构建了我的项目,对其进行了测试、发布并在 IIS 中进行了设置。
遗憾的是,错误消息的描述性不强。我想知道在将 .NET Core 和 Angular 2 与 IIS 一起使用时,是否还有其他人 运行 遇到过这样的问题。我猜我在设置中遗漏了什么?
提前致谢!
编辑:
我根据@Eliseo 的反馈更新了我的web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="aspNetCore"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\BrightApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 805b51a9-21a4-4f6f-8eb6-74955992b4d6-->
你好像有问题web.config。我 PC 中的 web.config 略有不同,我必须添加 remove name="aspNetCore"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<!--I add this line bellow --->
<remove name="aspNetCore"/>
<!--- --->
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyAplication.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
还要检查您的应用程序名称是否没有空格并尝试在控制台中写入
dotnet MyAplication.dll
抱歉,希望对您有所帮助,但我不知道更多
经过数小时的故障排除和堆栈溢出后,我能够按照 IIS 的首次设置指南(只是为了仔细检查所有内容)、重新启动 IIS 并打开防火墙上的端口来解决此问题。
事后看来,这是一个糟糕的问题,因为答案可能有很多。
我的公司正在使用 ASP.NET 一些工具,我想我会尝试使用 .NET Core 和 Angular。我构建了我的项目,对其进行了测试、发布并在 IIS 中进行了设置。
遗憾的是,错误消息的描述性不强。我想知道在将 .NET Core 和 Angular 2 与 IIS 一起使用时,是否还有其他人 运行 遇到过这样的问题。我猜我在设置中遗漏了什么?
提前致谢!
编辑:
我根据@Eliseo 的反馈更新了我的web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="aspNetCore"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\BrightApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 805b51a9-21a4-4f6f-8eb6-74955992b4d6-->
你好像有问题web.config。我 PC 中的 web.config 略有不同,我必须添加 remove name="aspNetCore"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<!--I add this line bellow --->
<remove name="aspNetCore"/>
<!--- --->
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyAplication.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
还要检查您的应用程序名称是否没有空格并尝试在控制台中写入
dotnet MyAplication.dll
抱歉,希望对您有所帮助,但我不知道更多
经过数小时的故障排除和堆栈溢出后,我能够按照 IIS 的首次设置指南(只是为了仔细检查所有内容)、重新启动 IIS 并打开防火墙上的端口来解决此问题。
事后看来,这是一个糟糕的问题,因为答案可能有很多。