HTTP Error 401.2 - Unauthorized with Error Code 0x80070005 with both IIS ans IIS Express

0

After attempting to configure IIS as a replacement for IIS Express, both stopped working and delivered the above error on deploying the .NET Core project in VS2019. According to IIS anonymous authentication is enabled, I also entered explicit user name and password as well as giving my user all rights to work with the project's directory. I restarted the IIS several times and re-created the pools and Pages, as well as repairing VS2019 in hope to get the IIS Express running again at least. I have no idea what else I could do.

EDIT: I am using IIS10

Module
   IIS Web Core
Notification
   AuthenticateRequest
Handler
   aspNetCore
Error Code
   0x80070005
Requested URL
   http://localhost:12345/
Physical Path
   C:\inetpub\...
Logon Method
   Noch unbestimmt
Logon User
   Noch unbestimmt
iis
visual-studio-2019
iis-express
asked on Stack Overflow Sep 24, 2020 by Beltway • edited Sep 24, 2020 by Beltway

2 Answers

0

You can try the following steps to solve your problem:

  1. Right click on the project, go to properties.
  2. Select the web, and then you will find a service setting
  3. Change the project URL for other port, like http://localhost:44338/.
answered on Stack Overflow Sep 25, 2020 by samwu • edited Sep 25, 2020 by samwu
0

I was able to figure it out myself by now:

For some reason during setting up the IIS and IIS profile (accidentally or by some quirk of VS), the anynomous authentification setting was set to false. Which also affected the IIS Express to not work properly anymore. Simply enabled anonymous authentification resolved the issue for both. Project Properties -> Debug -> IIS profile -> anonymous authentification: ✓

answered on Stack Overflow Sep 25, 2020 by Beltway

User contributions licensed under CC BY-SA 3.0