Could not load type 'Amazon.Runtime.Endpoints.IEndpointProvider' from assembly 'AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'.

0

hi when executing the below code this error is thrown "Could not load type 'Amazon.Runtme.Endpoints.IEndpointProvider' from assembly 'AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'." Code ->


            "try
            {
                client = new AmazonSecurityTokenServiceClient();
                var response = client.AssumeRoleAsync(new AssumeRoleRequest
                {
                    RoleArn = "arn:aws:iam::712090922:role/TestRole",
                    RoleSessionName = "newsessionanme2"
                });
                Credentials credentials = response.Result.Credentials;
                string access = credentials.AccessKeyId;
                AWSCredentials awsCredentials = GetAWSCredentials(credentials.AccessKeyId, credentials.SecretAccessKey, credentials.SessionToken);
                AmazonS3Client clientS3 = new AmazonS3Client(awsCredentials, Amazon.RegionEndpoint.USEast1);
                var s3Response = clientS3.ListBuckets();

                Console.ReadLine();

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }"

I am running this on .Net framework 4.8 with AWSSDK.Core , AWSSDK.SecurityToken ,AWSSDK.S3 nuget packages. The code throws exception during the client object creation of AmazonSecurityTokenServiceClient();

asked a year ago96 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions