title: How to signup a user with AWS Cognito and a console .NET Core 2.0?
body: <p>I'm trying to signup a user with AWS Cognito with my .net core 2.0 console app and a user pool. My app crashes when this line gets executed:</p>
  
  <pre><code>var result = await _client.SignUpAsync(signUpRequest);
  </code></pre>
  
  <p>The frustrating part is that no exception is rasied. My console app just stops working under Visual Studio 2017. No errors, nothing. So, I tried to setup AWS SDK logging with log4net but the only thing that gets logged is my own log info entry. HELP!!!! Super frustrating. </p>
  
  <p>Here is the Program.cs portion to setup logging:</p>
  
  <pre><code>[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
  
  namespace ASSA
  {
      class Program
      {
          private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
          private static readonly ILoggerRepository repo = LogManager.GetRepository(Assembly.GetEntryAssembly());
  
          static void Main(string[] args)
          {
              if (repo.Configured)
                  Console.WriteLine("configured");
  
              AWSConfigs.AWSRegion = "us-east-1";
              AWSConfigs.LoggingConfig.LogTo = LoggingOptions.Log4Net;
              AWSConfigs.LoggingConfig.LogResponses = ResponseLoggingOption.Always;
  
              log.Info("Started ASSA...");
              ShowMenu();
              WaitForMenuSelection();
          }
  </code></pre>
  
  <p>Here is the SignUpUser method:</p>
  
  <pre><code>    public async Task&lt;bool&gt; SignUpUser(string username, string password, string email, string phoneNumber, string firstName, string lastName)
      {
          try
          {
              var signUpRequest = new SignUpRequest
              {
                  ClientId = CLIENT_ID,
                  Username = username,
                  Password = password
              };
  
              var attributeType = new AttributeType
              {
                  Name = "phone_number",
                  Value = phoneNumber
              };
              signUpRequest.UserAttributes.Add(attributeType);
  
              var attributeType1 = new AttributeType
              {
                  Name = "email",
                  Value = email
              };
              signUpRequest.UserAttributes.Add(attributeType1);
  
              var attributeType2 = new AttributeType
              {
                  Name = "given_name",
                  Value = firstName
              };
              signUpRequest.UserAttributes.Add(attributeType2);
  
              var attributeType3 = new AttributeType
              {
                  Name = "family_name",
                  Value = lastName
              };
              signUpRequest.UserAttributes.Add(attributeType3);
  
              var result = await _client.SignUpAsync(signUpRequest);
          }
          catch (Exception e)
          {
              Console.WriteLine(e);
              return false;
          }
          return true;
      }
  </code></pre>
  
  <p>Here is how I setup the credentials:</p>
  
  <pre><code>            try
          {
              BasicAWSCredentials creds = null;
  
              var chain = new CredentialProfileStoreChain();
              if (chain.TryGetAWSCredentials("Thomas", out var awsCredentials))
              {
                  creds = new BasicAWSCredentials(awsCredentials.GetCredentials().AccessKey, awsCredentials.GetCredentials().SecretKey);
              }
  
              _client = new AmazonCognitoIdentityProviderClient(creds, Amazon.RegionEndpoint.USEast1);
          }
          catch (Exception e)
          {
              Console.WriteLine(e);
              throw;
          }
  </code></pre>
  
  <p>It crashes on line:</p>
  
  <blockquote>
    <p>var result = await _client.SignUpAsync(signUpRequest);</p>
  </blockquote>
  
  <p>Any help would be appreciated.</p>