开发者社区> 问答> 正文

.net core 2.1 调用 OssClient 出错

            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

展开
收起
鹰1979 2018-11-25 19:52:19 2941 0
1 条回答
写回答
取消 提交回答
  • Renet core 2.1 调用 OssClient 出错
    楼主问题解决没? 有没有什么新的进展?
    2019-01-07 10:36:17
    赞同 1 展开评论 打赏
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载