If I don't specify the hosting model in web.config, what will be the default process in asp.net core 5.0

Viewed 13

This is my web.config file, I am getting 500 exception after I have deployed project in azure server, If I remove V2 in modules application runs, but it runs on kestrel not in IIS.

<configuration>
  <location path="." inheritInChildApplications="false">
    <!--<system.web>
      <httpRuntime maxRequestLength="204800" enableVersionHeader="false" />
    </system.web>-->
    <system.webServer>
      <security>
        <!--Removes Server header from response-->
        <requestFiltering removeServerHeader="true">
          <!--200 MB in bytes-->
          <requestLimits maxAllowedContentLength="209715200" maxQueryString="10240" />
        </requestFiltering>
      </security>
      <httpProtocol>
        <customHeaders>
          <remove name="X-Powered-By" />
          <remove name="X-AspNet-Version" />
          <remove name="X-Forwarded-Host" />
          <remove name="Server" />
        </customHeaders>
      </httpProtocol>
      <handlers>
        <remove name="aspNetCore" />
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\Data.WebAPI.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel = "inprocess"/>
    </system.webServer>
  </location>
</configuration>```
0 Answers
Related