OssClient _client = new OssClient(_endpoint, _accessKeyId, _accessKeySecret);
IEnumerable<Bucket> list = _client.ListBuckets();
调用ListBuckets()时出错。 调用其他的方法比如PutObject()也是同样的错误。
at Aliyun.OSS.Common.Communication.HttpExtensions.AddInternal(WebHeaderCollection headers, String key, String value) in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Common\Communication\ServiceClientImpl.cs:line 488
at Aliyun.OSS.Common.Communication.HttpFactory.SetRequestHeaders(HttpWebRequest webRequest, ServiceRequest serviceRequest, ClientConfiguration configuration) in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Common\Communication\ServiceClientImpl.cs:line 415
at Aliyun.OSS.Common.Communication.HttpFactory.CreateWebRequest(ServiceRequest serviceRequest, ClientConfiguration configuration) in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Common\Communication\ServiceClientImpl.cs:line 383
at Aliyun.OSS.Common.Communication.ServiceClientImpl.SendCore(ServiceRequest serviceRequest, ExecutionContext context) in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Common\Communication\ServiceClientImpl.cs:line 171
at Aliyun.OSS.Common.Communication.ServiceClient.Send(ServiceRequest request, ExecutionContext context) in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Common\Communication\ServiceClient.cs:line 52
at Aliyun.OSS.Common.Communication.RetryableServiceClient.SendImpl(ServiceRequest request, ExecutionContext context, Int32 retryTimes) in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Common\Communication\RetryableServiceClient.cs:line 63
at Aliyun.OSS.Commands.OssCommand.Execute() in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\Commands\OssCommand.cs:line 87
at Aliyun.OSS.OssClient.ListBuckets() in D:\work\oss\csharp\aliyun-oss-csharp-sdk\sdk\OssClient.cs:line 232
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。