Base solution for your next web application
Open Closed

ASP.NET Zero 8 and Identity Server #8096


User avatar
0
mac created

We're looking at using an ASP.NET Zero project as a central Identity Server for other projects. We have the latest one (8) with Core/Angular as separate projects.

We're unable to locate the discovery document in the running applicatoin, and the links/images from the following link aren't working:

https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Infrastructure-Core-Angular-Identity-Server4-Integration#testing-with-client

Can we get some guidance?

Thanks, //mac


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    I have fixed the problem, you can temporarily check the github documentation

    https://github.com/aspnetzero/documents/blob/master/docs/en/Infrastructure-Core-Angular-Identity-Server4-Integration.md https://github.com/aspnetzero/documents/blob/master/docs/en/Infrastructure-Core-Mvc-Identity-Server4-Integration.md

    More about Identity Server 4 you need to check its documentation. https://identityserver4.readthedocs.io/en/latest/ http://docs.identityserver.io/en/latest/endpoints/discovery.html

  • User Avatar
    0
    Jason created

    For a little more specificity, I am working on the same project as mac, and we are using a couple different approaches for the connections: user password, and code flow with PKCE. For the user password approach, we are trying to build the user list GET separately in our own project. Every time we ping it, we get an error with the discovery document GET request:

     var client = new HttpClient();
    
                var disco = await client.GetDiscoveryDocumentAsync(ServerUrlBase);
                if (disco.IsError)
                {
                    throw new Exception(disco.Error);
                }
    

    This prevents further connection. The error coming back is that the target machine is actively refusing the connection. The ServerUrlBase being used is the same one that is set in the IdentityServer project, and I have run the dotnet cert to see if the certificate exists, which it does, so that doesnt seem to be the issue.

    Our problem is that we cannot get past the discovery document bit to get to the access token request.

  • User Avatar
    0
    maliming created
    Support Team

    Is the URL of the Discovery Endpoint accessible? http://localhost:62114/.well-known/openid-configuration

  • User Avatar
    0
    mac created

    Here's the current state:

    1. We've been just trying to get the base ANZ 8.0 application working consistently for almost a week now. That's a lot of time in a solution that is meant to shorten time to market. We have done no customization, other than things to get the base solution working (such as adjusting the ports)
    2. We have the ASP.NET Core applicationURL (.NET), as well as the remoteServiceBaseUrl (angular) set to: http://localhost:22742/
    3. The Angular solution is being served on http://localhost:4205/
    4. Going to the angular solution in a browser, results in the following: http://localhost:22742/AbpUserConfiguration/GetAll?d=1575126211669 being 404 and not found
      1. Where is this call at?
    5. Going to http://localhost:62114/.well-known/openid-configuration results in connection being refused
    6. Changing to other ports for the discovery document doesn't help either.

    Note, we are able to access the Swagger UI and get results for example GetTenants, returns the Default tenant with various attributes under the items array.

  • User Avatar
    0
    maliming created
    Support Team

    hi @mac

    Going to the angular solution in a browser, results in the following: http://localhost:22742/AbpUserConfiguration/GetAll?d=1575126211669 being 404 and not found Where is this call at?

    https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/AppPreBootstrap.ts#L148

    Going to http://localhost:62114/.well-known/openid-configuration results in connection being refused Changing to other ports for the discovery document doesn't help either.

    The url of the discovery document should be the application url of your identity server4

    Can I see it remotely? If so, please send your teamviewer information to [email protected]

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.