joym8
joym8

Reputation: 4232

IIS unable to read web.config, no error details in message

We have a dotnet core 3.1 web API application that is published to an IIS 10 hosted on a Windows 2012 R2 datacenter VM.

The application is running under an application pool that has no managed code:

app pool screenshot

IIS is not able to read the web.config. This is what I get when clicking this app's Connection Strings in IIS:

IIS error

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <authorization>
                <remove users="" roles="mydomain\mydevrole" verbs="" />
                <add accessType="Allow" users="?" roles="" />
            </authorization>
        </security>
    </system.webServer>
</configuration>

Upvotes: 5

Views: 9942

Answers (2)

joym8
joym8

Reputation: 4232

Installing ASP.NET Core Runtime is not enough. You have to install the Hosting Bundle.

https://dotnet.microsoft.com/download/dotnet-core/3.1

download page

Upvotes: 9

timhowarduk
timhowarduk

Reputation: 43

Have you checked file permissions? Specifically has the IIS_IUSR$ group got permissions to read the folder where the website is located? Also check the windows event logs to see if there is more information.

Upvotes: 0

Related Questions