Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am unable to exclude windows authentication for a path (healthcheck) for my aspnet app.
In launchsettings we have enabled windows authentication:
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:54594",
"sslPort": 44319
}
Then, I added an element in webconfig to enable anonymous access:
<location path="health">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
<windowsAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</location>
With this in place I have 404 error when accessing the path, the error comes from IIS. As if all handlers were wiped out.
curl https://localhost:44319/health
curl : HTTP Error 404.0 - Not Found
Expected Behavior
I should see healthcheck page not 404 error from IISExpress.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
8.0.101
Anything else?
IDE: Rider