UseIISPlatformHandler()是否已正确弃用于UseIIS()?

Kon*_*ten 6 c# iis asp.net-core

这个地方,有关Core变更的信息如下.

public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory)
{
  ...
  // Remove call to app.UseIISPlatformHandler(); This is handled by UseIIS in Main.
  // Remove call to app.UseForwardedHeaders(); This is handled by UseIIS in Main.
  ...
}
Run Code Online (Sandbox Code Playgroud)

但是,在检出方法的内容时,没有像UseIIS()这样的调用.最近的是UseIISIntegration(),但它的注释就好像它替换了UseForwardedHeaders().

public static void Main(string[] args)
{
  var host = new WebHostBuilder()
    .UseDefaultConfiguration(args)
    .UseServer("Microsoft.AspNetCore.Server.Kestrel")
    // Replaces call to UseIISPlatformHandlerUrl()
    .UseIISIntegration()
    .UseStartup<Startup>()
    .Build();

  host.Run();
}
Run Code Online (Sandbox Code Playgroud)

我有什么误会?

Hen*_*ema 5

问题相当陈旧,从那时起一些事情发生了变化.不过,你走在正确的轨道上.

UseIISPlatformHandler呼叫确实已从Startup转移到Program start并已重命名为UseIISIntegration.