开发者社区 问答 正文

C开发OSS工具,分组上传文件时流关闭的问题,求教!

想用C#开发个OSS工具,当然,也只会用C#!在用分组上传文件时调用UpdataPart方法时,会抛出访问的流已经关闭的异常,初步判断为Aliyun.OpenServices.ClientConfiguration.ConnectionTimeout的问题。请问大家有没有遇到这样的问题,这样的问题应该怎么解决,谢谢,求教了。

展开
收起
futiangong 2013-08-31 22:31:30 9108 分享 版权
2 条回答
写回答
取消 提交回答
  • lux
    ReC开发OSS工具,分组上传文件时流关闭的问题,求教!
    我也遇到了这种情况,求解

    [ObjectDisposedException: 无法访问已关闭的流。]
       System.IO.__Error.StreamIsClosed()  57
       System.IO.MemoryStream.Seek(Int64 offset, SeekOrigin loc)  7728068
       Aliyun.OpenServices.Common.Communication.RetryableServiceClient.SendImpl(ServiceRequest request, ExecutionContext context, Int32 retries) in d:\workspace\openapi\trunk\dotnet\aliyunapi\Common\Communication\RetryableServiceClient.cs:73
       Aliyun.OpenServices.Common.Communication.RetryableServiceClient.Send(ServiceRequest request, ExecutionContext context) in d:\workspace\openapi\trunk\dotnet\aliyunapi\Common\Communication\RetryableServiceClient.cs:54
       Aliyun.OpenServices.OpenStorageService.Commands.OssCommand.Execute() in d:\workspace\openapi\trunk\dotnet\aliyunapi\OpenStorageService\Commands\OssCommand.cs:72
       Aliyun.OpenServices.OpenStorageService.Commands.OssCommand`1.Execute() in d:\workspace\openapi\trunk\dotnet\aliyunapi\OpenStorageService\Commands\OssCommand.cs:116
       Aliyun.OpenServices.OpenStorageService.OssClient.CompleteMultipartUpload(CompleteMultipartUploadRequest completeMultipartUploadRequest) in d:\workspace\openapi\trunk\dotnet\aliyunapi\OpenStorageService\OssClient.cs:401
       Uploader.Step3() in g:\项目\代码\云\AliyunOSS Server\Uploader.ashx:159
       Uploader.ProcessRequest(HttpContext context) in g:\项目\代码\云\AliyunOSS Server\Uploader.ashx:56
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  181
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  75
    2013-09-01 23:29:52
    赞同 展开评论
  • ReC开发OSS工具,分组上传文件时流关闭的问题,求教!
    搞嘛啊,没人给个指点啥的。

    -------------------------

    回2楼lux的帖子
    我的方式是把请求时间加大。
    2013-09-01 18:49:25
    赞同 展开评论