Am confused about web.config in .NET Core

前端 未结 3 1063
陌清茗
陌清茗 2021-02-12 22:47

There are a bunch of contradictory statements about web.config and .NET Core.

  • Places saying it\'s gone.
    • https://dotnetcore.show/episode-10-configuration-
3条回答
  •  执念已碎
    2021-02-12 23:37

    This may be incorrect feel free to correct me but the way I understand it.

    web.config was used to give some information to the hosting software like IIS some configuration details to help run the app correctly.

    In dotnet core You have a layer between the hosting software like IIS and your Web App, and it's called Kestrel.

    Kestrel is a proxy between the two. And the default web.config that you see, if you peek inside you will see default code which basically says, i'm a dotnet core app use the dotnet core runtime to run me. You can still put config there to tell IIS how to work, I specifically used it to increase the file upload size and windows authentication.

    I would configure HTTP Headers using the middle ware.

提交回复
热议问题