How to setup identityserver4 on IISExpress?

stephyap

New member
Joined
Apr 30, 2021
Messages
4
Programming Experience
Beginner
This is my appsettings.json in my asp.netcore3.1 Api:
1619771080255.png

When I run the Api it gives me the error:
Document
NameValueType
disco.Error"Error connecting to https://localhost:80/.well-known/openid-configuration. The SSL connection could not be established, see inner exception.."string

It seems that the AuthConfig Endpoint port localhost:80 does not run on my IIS Express.

I don't know how to run this port on IIS Express. Please help.
 
It's been years, but I vaguely recall that when I first setup VS2019 and try to create web based project, it asked me about installing a developer self-signed certificate on the machine as well as switching Windows 10 over into Developer Mode. Did you do these steps?
 
It's been years, but I vaguely recall that when I first setup VS2019 and try to create web based project, it asked me about installing a developer self-signed certificate on the machine as well as switching Windows 10 over into Developer Mode. Did you do these steps?
Thanks for the reply @Skydiver . Actually this is a source code from azure which I need to run on my local machine. I did not do the steps that you mentioned above. The documentation tells me this:
1620011178312.png

I already installed the devcert.pfx on my machine though.
 
As a quick aside, HTTPS runs on port 443, but in your OP you mentioned port 80.
 
Well at this point it time to check the obvious.

Does the directory ". well-known" exist? Does the file "openid-configuration" exist?

If neither physically exist, is there code in that library you are using that detects that URL is requested and returns a response for it? Is that code being hit?
 
Well at this point it time to check the obvious.

Does the directory ". well-known" exist? Does the file "openid-configuration" exist?

If neither physically exist, is there code in that library you are using that detects that URL is requested and returns a response for it? Is that code being hit?
When I build the Api there are no errors:
1620179899253.png

This is my launchsettings.json:
1620180181095.png


This is my appsettings.json:
1620180510567.png


I already tested IdentityServer4 implementation based on their documentation, In this case it seems like my AuthConfig(localhost:8080) or IdentityServer is not running inside my IIS Express web server and im running out of ideas how to run my IdentityServer.
 

Attachments

  • 1620180442610.png
    1620180442610.png
    36.1 KB · Views: 8
Back
Top Bottom