I hosted my ASP.NET Core app on IIS (using the publish-in- folder method). I tried to create my own web.config file to see detailed error messages on the client side. So I added file web.config:
<configuration>
<system.web>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
</configuration>
After I restarted IIS, nothing happened. Clients still got the default error:
Can I somehow get additional information about errors using file web.config?
web.config
<system.webServer>
<httpErrors errorMode="Detailed" />
<aspNetCore processPath="dotnet">
<environmentVariables>
<environmentVariable name="ASPNETCORE_DETAILEDERRORS" value="true" />
</environmentVariables>
</aspNetCore>
</system.webServer>