aliyun / aliyun-oss-csharp-sdk

Aliyun OSS SDK for C#
MIT License
379 stars 204 forks source link

client.ListObjects 无法使用 #133

Open clarissachanicheng opened 2 years ago

clarissachanicheng commented 2 years ago

无论是带前缀还是不带,用ListObjectsRequest 还是不用, 都会再listObject 的时候 出现

{ "Message": "發生錯誤。", "ExceptionMessage": "發生一或多項錯誤。", "ExceptionType": "System.AggregateException", "StackTrace": " 於 System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n 於 System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)\r\n 於 System.Threading.Tasks.Task1.get_Result()\r\n 於 Aliyun.OSS.Common.Communication.ServiceClientNewImpl.SendCore(ServiceRequest request, ExecutionContext context)\r\n 於 Aliyun.OSS.Common.Communication.ServiceClient.Send(ServiceRequest request, ExecutionContext context)\r\n 於 Aliyun.OSS.Common.Communication.RetryableServiceClient.SendImpl(ServiceRequest request, ExecutionContext context, Int32 retryTimes)\r\n 於 Aliyun.OSS.Common.Communication.RetryableServiceClient.Send(ServiceRequest request, ExecutionContext context)\r\n 於 Aliyun.OSS.Commands.OssCommand.Execute()\r\n 於 Aliyun.OSS.OssClient.ListObjects(ListObjectsRequest listObjectsRequest)\r\n 於 Aliyun.OSS.OssClient.ListObjects(String bucketName, String prefix)\r\n 於 Aliyun.OSS.OssClient.ListObjects(String bucketName)\r\n 於 AMSService.Controllers.LeaveController.HaveAttachFile(String id, String corp) 於 C:\Users\USER\Source\Workspaces\AMSService\AMSService\AMSService\Controllers\LeaveController.cs: 行 2124\r\n 於 lambda_method(Closure , Object , Object[] )\r\n 於 System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass10.b9(Object instance, Object[] methodParameters)\r\n 於 System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n 於 System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- 先前擲回例外狀況之位置中的堆疊追蹤結尾 ---\r\n 於 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 於 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 於 System.Web.Http.Controllers.ApiControllerActionInvoker.d0.MoveNext()\r\n--- 先前擲回例外狀況之位置中的堆疊追蹤結尾 ---\r\n 於 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 於 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 於 System.Web.Http.Controllers.ActionFilterResult.d2.MoveNext()\r\n--- 先前擲回例外狀況之位置中的堆疊追蹤結尾 ---\r\n 於 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 於 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 於 System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()", "InnerException": { "Message": "發生錯誤。", "ExceptionMessage": "無法以此動詞類型 (Verb-Type) 傳送內容主體。", "ExceptionType": "System.Net.ProtocolViolationException", "StackTrace": " 於 System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)\r\n 於 System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)\r\n 於 System.Net.Http.HttpClientHandler.StartGettingRequestStream(RequestState state)\r\n 於 System.Net.Http.HttpClientHandler.PrepareAndStartContentUpload(RequestState state)" } }