Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Unable to find credentials

Exception 1 of 4:
System.ArgumentException: App.config does not contain credentials information. Either add the AWSAccessKey and AWSSecretKey or AWSProfileName.
   場所 Amazon.Runtime.StoredProfileAWSCredentials..ctor(String profileName, String profilesLocation) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 313
   場所 Amazon.Runtime.StoredProfileAWSCredentials..ctor(String profileName) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 262
   場所 Amazon.Runtime.StoredProfileAWSCredentials..ctor() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 252
   場所 Amazon.Runtime.EnvironmentAWSCredentials..ctor() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 483
   場所 Amazon.Runtime.FallbackCredentialsFactory.<Reset>b__1() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 967
   場所 Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 987

Exception 2 of 4:
System.ArgumentException: App.config does not contain credentials information. Either add the AWSAccessKey and AWSSecretKey or AWSProfileName.
   場所 Amazon.Runtime.StoredProfileAWSCredentials..ctor(String profileName, String profilesLocation) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 313
   場所 Amazon.Runtime.StoredProfileAWSCredentials..ctor(String profileName) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 262
   場所 Amazon.Runtime.StoredProfileAWSCredentials..ctor() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 252
   場所 Amazon.Runtime.FallbackCredentialsFactory.<Reset>b__2() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 968
   場所 Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 987

Exception 3 of 4:
System.InvalidOperationException: The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY were not set with AWS credentials.
   場所 Amazon.Runtime.EnvironmentVariablesAWSCredentials..ctor() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 433
   場所 Amazon.Runtime.FallbackCredentialsFactory.<Reset>b__3() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 969
   場所 Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 987

Exception 4 of 4:
Amazon.Runtime.AmazonServiceException: Unable to reach credentials server
   場所 Amazon.Runtime.InstanceProfileAWSCredentials.GetContents(Uri uri) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 851
   場所 Amazon.Runtime.InstanceProfileAWSCredentials.<GetAvailableRoles>d__0.MoveNext() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 730
   場所 Amazon.Runtime.InstanceProfileAWSCredentials.GetFirstRole() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 858
   場所 Amazon.Runtime.InstanceProfileAWSCredentials..ctor() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 716
   場所 Amazon.Runtime.FallbackCredentialsFactory.<Reset>b__4() 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 971
   場所 Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 場所 d:\Jenkins\workspace\autocut-branch-paginators\sdk\src\AWSSDK_DotNet35\Amazon.Runtime\AWSCredentials.cs:行 987



I downloaded the AWSSDK.dll file from AWS and add it in my visual studio application references. When I execute the visual studio code i am getting the above error.

What I have tried:

No Idea what i to do? Please help someone.
Posted
Updated 28-Jul-21 6:17am
Comments
Member 10556393 29-Jul-21 1:53am    
For security purpose our organization aws team could not share the AWSAccesskey, AWSSecretkey. Instead of that they suggest use presigned URL. Anyone can help how to create presigned URL and how to implement it into our visual studio applciations? Thanks in advance.

1 solution

You have not configured your AWS credentials. Read the documentation and follow the instructions:
Configuring AWS Credentials - AWS SDK for .NET (version 3)[^]
Referencing Credentials using Profiles | AWS Developer Tools Blog[^]
 
Share this answer
 
Comments
Member 10556393 29-Jul-21 1:53am    
For security purpose our organization aws team could not share the AWSAccesskey, AWSSecretkey. Instead of that they suggest use presigned URL. Anyone can help how to create presigned URL and how to implement it into our visual studio applciations? Thanks in advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900