Linux上的AWS .NET SDK [英] AWS .NET SDK on Linux

查看:92
本文介绍了Linux上的AWS .NET SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将第三方制作的ASP.NET应用程序从Windows迁移到Linux.我阅读了文档,但没有任何东西表明这应该是一个问题,但是可悲的是

I am currently moving an ASP.NET application made by a third party from Windows to Linux. I read the documentation and nothing indicates this should be a problem, but sadly

var profile = new CredentialProfile(profileName, credentials) {
    Region = RegionEndpoint.EUWest1
};

var netSDKFile = new NetSDKCredentialsFile();
netSDKFile.RegisterProfile(profile);

引发以下异常

Unhandled Exception: Amazon.Runtime.AmazonClientException: The encrypted store is not available.  This may be due to use of a non-Windows operating system or Windows Nano Server, or the current user account may not have its profile loaded.
   at Amazon.Util.Internal.SettingsManager.EnsureAvailable()
   at Amazon.Runtime.CredentialManagement.NetSDKCredentialsFile..ctor()

Linux不支持Amazon .NET SDK(或其一部分)吗?如果是这样,是否有可能的解决方法?

Is the Amazon .NET SDK(or a part of it) not supported on Linux? If that is the case, is there a possible workaround?

推荐答案

在大多数情况下,Windows所支持的Linux很少.除了 NetSDKCredentialsFile 之外,我什么都没想到,这是因为它使用Win32 API来加密凭据.

For the most part there is very little that isn't supported on Linux that is supported on Windows. Off of the top of my head I can't think of anything besides NetSDKCredentialsFile which is due to the fact it uses Win32 API to encrypt credentials.

您可以使用 SharedCredentialsFile 将配置文件注册到存储在〜/.aws/credentials 下的凭据文件中.这是所有其他AWS开发工具包和工具支持的同一凭证存储.

You can use SharedCredentialsFile to register a profile in the credentials file stored under ~/.aws/credentials. This is the same credential stored supported by all of the other AWS SDK and Tools.

这篇关于Linux上的AWS .NET SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆