I'm developing a Web API with C#, Net 8, in Visual Studio 2022.
Everything was fine until I changed one detail in
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:20040",
"sslPort": 44363
}
I changed localhost
to an local IP, let's say 192.168.188.3
, in order to test access from my laptop.
Starting the debug mode, I got an message window with an error message:
(I'm translating from German, so the actual text could differ from the english message)
'No connection could be established to webserver IIS Express.
[...] Failed to register URL "http://192.168.188.3:20040/" for site "MyAPI application /". Error description: access denied (0x80070005)'
I changed the line to its former value, but the error message comes up again and again as soon as I start the debug process. The IP does not exist in the whole source code anymore!
I already tried to delete '%USERPROFILE%\AppData\Local\Temp\IISExpress'
and I also read the question https://learn.microsoft.com/en-us/answers/questions/1191901/unable-to-launch-iis-express-web-server
but the solutions mentioned there do not seem to work with an API project.