0
 s3Client = new AmazonS3Client(new BasicAWSCredentials(apcong.Value.AWSACCESSKEY, apcong.Value.AWSSECRETKEY), RegionEndpoint.USEast1);

不适用于 .net core 3.1

我试图创建 AmazonS3Client 但它始终为空并抛出 FallbackInternalConfigurationFactory 异常

        "InnerException": {
        "ClassName": "System.TypeInitializationException",
        "Message": "The type initializer for 'Amazon.Runtime.Internal.Settings.PersistenceManager' threw an exception.",
        "Data": null,
        "HelpURL": null,
        "StackTraceString": "   at Amazon.Util.Internal.SettingsManager.GetSettings()\r\n   at Amazon.Util.Internal.SettingsManager.TryGetObjectByProperty(String propertyName, String value, String& uniqueKey, Dictionary`2& properties)\r\n   at Amazon.Runtime.CredentialManagement.NetSDKCredentialsFile.TryGetProfile(String profileName, CredentialProfile& profile)\r\n   at Amazon.Runtime.CredentialManagement.CredentialProfileStoreChain.TryGetProfile(String profileName, CredentialProfile& profile)\r\n   at Amazon.Runtime.Internal.ProfileInternalConfiguration.Setup(ICredentialProfileSource source, String profileName)\r\n   at Amazon.Runtime.Internal.FallbackInternalConfigurationFactory.Reset()\r\n   at Amazon.Runtime.Internal.FallbackInternalConfigurationFactory..cctor()",
        "RemoteStackTraceString": null,

        "TypeName": "Amazon.Runtime.Internal.Settings.PersistenceManager"
    },
    "HelpURL": null,
    "StackTraceString": "   at Amazon.Runtime.ClientConfig.get_RetryMode()\r\n   at Amazon.Runtime.AmazonServiceClient.BuildRuntimePipeline()\r\n   at WebApp.Controllers.SpeakerDiarizationController.ProcessAudioByTrnscribeJob(GeneralObj obj) in SpeakerDiarizationController.cs:line 58",

    "TypeName": "Amazon.Runtime.Internal.FallbackInternalConfigurationFactory"
}
4

1 回答 1

0

AWSSDK.S3 3.3.104 为我工作,如果您跳过任何一个来降级,则将您的所有 awssdk 引用更新为相同版本,事情将是相同的

于 2020-04-24T08:40:53.430 回答