Vol*_*hat 11 c# iis azure asp.net-core
我确实将我的应用程序升级到aspnetcore 2.2,但是由于一些遗留的限制,我打算以后删除这些限制,因此我必须以.NET Framework为目标。
新的托管模型InProcess带来了改进,因此我想使用它,但是当我部署到Azure时,我得到了错误。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<!--AspNetCoreModuleV2 switch back when its released on azure-->
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Flymark.Online.Web.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="../stdout" hostingModel="InProcess" />
</system.webServer>
</location>
</configuration>
Run Code Online (Sandbox Code Playgroud)
还有我的错误
HTTP错误500.0-ANCM进程内处理程序加载失败导致此问题的常见原因:找不到指定版本的Microsoft.NetCore.App或Microsoft.AspNetCore.App。在应用程序中未引用进程内请求处理程序Microsoft.AspNetCore.Server.IIS。ANCM找不到dotnet。故障排除步骤:检查系统事件日志中是否有错误消息启用日志记录应用程序进程的标准输出消息将调试器附加到应用程序进程并检查有关更多信息,请访问:https : //go.microsoft.com/fwlink/?LinkID=2028526
如果我将同一个应用程序更改为进程外和模块到v1,则它将按预期工作
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<!--AspNetCoreModuleV2 switch back when its released on azure-->
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Flymark.Online.Web.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="../stdout" hostingModel="OutOfProcess" />
</system.webServer>
</location>
</configuration>
Run Code Online (Sandbox Code Playgroud)
我正在使用Azure管道和MSbuild发布应用程序。