I'm working through the IdentityServer MVC walkthrough in the documentation and it's great until I get to Part 2 where I'm calling another api from the MVC app. Here, the browser hangs at the call to /callApi/ClientCredentials until eventually timing out with task cancelled error and the VS debugger throws an Invalid Operation Exception in the api Startup class at app.UseIdentityServerBearerTokenAuthentication(...)
with the inner exception:
IDX10803: Unable to create to obtain configuration from: 'http://localhost:44300/identity/.well-known/openid-configuration'.
As I said, everything was working great in the walkthrough until now. The discovery document can be obtained via the browser from that address no problem (no SSL error - the site cert is trusted).
This looks similar to here but yet it is different because in this configuration identityserver and the access token validation middleware are in separate processes (both in iis express running with my account). I tried setting DelayLoadMetadata
anyway and now the browser returns the task cancelled exception and Visual Studio doesn't throw an exception.
I added logging and didn't see any issues - it shows the MVC client getting its access token and then that's it.
I also reconfigured all the apps and SSL ports to use a "real" host name and cert so I could watch everything via Fiddler. That worked great for the whole walkthrough (and the previous one, too) but still gets stuck at this point. I see the api app querying for the discovery document and it never gets a response.
What am I missing?