aliyun / aliyun-oss-csharp-sdk

Aliyun OSS SDK for C#
MIT License
381 stars 206 forks source link

dotnet core 2.1报错 #66

Closed sgyy closed 5 years ago

sgyy commented 6 years ago

再dotnet core 2.0 下运行正常 dotnet core 2.1报错 错误信息如下:

The stream was already consumed. It cannot be read again.

   at System.Net.Http.HttpConnection.HttpConnectionResponseContent.ConsumeStream()
   at System.Net.Http.HttpConnection.HttpConnectionResponseContent.SerializeToStreamAsync(Stream stream, TransportContext context, CancellationToken cancellationToken)
   at System.Net.Http.HttpContent.CopyToAsyncCore(ValueTask copyTask)
zousq19910623 commented 6 years ago

你好,请教下,master分支支持.net core 2.0了是吗?

liguobao commented 5 years ago

看了下最新版是基于4.6.1的.

Error: Package 'Aliyun.OSS.SDK 2.9.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.

liguobao commented 5 years ago

刚刚试了一下,可以使用

dotnet core 2.1 正常.

BrisWhite commented 5 years ago

.NetCore 2.1环境下: image

.NetCore 2.0环境下: image

image System.Net.Http.HttpConnection.HttpConnectionResponseContent的流无法读取两次。

rujianwang commented 5 years ago

请问下 这个bug修复了吗?

caopengfei commented 5 years ago

至今都没修复,没人管的

Simplebear commented 5 years ago

dotnet2.1最新版也遇到这个问题,有人来解决一下吗?

caopengfei commented 5 years ago

你可以下载源码调试下你的代码,找到阿里云的自定义错误,只要解决了自定义错误的问题,代码就不会走到这个错误分支来了。也就是只有你传递的参数,或者授权权限有问题的时候,才会进入这段代码,我就是因为出现了权限错误(403),所以报错的,发现是少了传了一个参数(demo里面也没传)

huiguangjun commented 5 years ago

已更新到master 分支