aws / aws-aspnet-cognito-identity-provider

ASP.NET Core Identity Provider for Amazon Cognito
https://aws.amazon.com/developer/language/net/
Apache License 2.0
215 stars 89 forks source link

UriFormatException: Invalid URI: The hostname could not be parsed. #139

Closed kentbarber closed 4 years ago

kentbarber commented 4 years ago

I am not able to run this project. I have tried in VS 2017 and 2019. Could be a user error since I am just trying to run the Samples.sln directly. These are the errors...

` UriFormatException: Invalid URI: The hostname could not be parsed.

System.Uri.CreateThis(string uri, bool dontEscape, UriKind uriKind) System.Uri..ctor(string uriString) Amazon.Runtime.ClientConfig.GetUrl(RegionEndpoint regionEndpoint, string regionEndpointServiceName, bool useHttp, bool useDualStack) in ClientConfig.cs Amazon.Runtime.ClientConfig.DetermineServiceURL() in ClientConfig.cs Amazon.Runtime.Internal.DefaultRetryPolicy..ctor(IClientConfig config) in DefaultRetryPolicy.cs Amazon.Runtime.AmazonServiceClient.BuildRuntimePipeline() in AmazonServiceClient.cs `

klaytaybai commented 4 years ago

I was able to reproduce this. It would be nice to get the sample solution working

ehs035 commented 4 years ago

Make sure you add your AWS settings to: appsettings.Development.json when you run local.

ashishdhingra commented 4 years ago

Hi @kentbarber,

Good afternoon.

Based on input by @ehs035, I was able to get the Samples solution working by providing the following AWS settings in appsettings.Development.json:

  "AWS": {
    "Region": "<your region id goes here>",
    "UserPoolClientId": "<your user pool client id goes here>",
    "UserPoolClientSecret": "<your user pool client secret goes here>",
    "UserPoolId": "<your user pool id goes here>"
  }

Please confirm if it is working for you and if this issue could be closed.

Thanks, Ashish

github-actions[bot] commented 4 years ago

This issue has not recieved a response in 2 weeks. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.