c# - Client Disconnected Error on calling Web API -


itemprop = "text">

I have active activity that can save images.

It works well

However, sometimes errors occur.

Below is the server code:

  varappadata = hosting environment.mappath ("~ / App_Data"); String dirname = Guid.NewGuid (). ToString (); Var folder = path. Cobain (appadata, dynamite); Directory.CreateDirectory (folder); Var provider = new multipartFormDataStreamProvider (folder); Var Results = Waiting for the request. Content RedSteplattech Ascend (provider); Type = result.FileData first () .Headers .ToList () .Value first () .plit (',') [2] .plit ('=') [1]. Replace ("\" " , "") .Split () [1] '.', If (result.FileData.Count & LT; 1) {// ...} string name = result.FileData.First () LocalFileName.  5-10%  I find the following error:  
  error reading MIME multimode body part. System.Web.HttpException (0x800703E3): System.Web. system HostingkIIS7WorkerRequestkEndRead. web. disconnected on System.IO.Stream.b__e on HttpBufferlessInputStream.EndRead (IAsyncResult asyncResult). stream stream, IAsyncResult asyncResult) System.Threading.Tasks.TaskFactory`1.Fro mAsyncTrimPromise`1.Complete (TInstance thisRef, requires 3 Andmenth, Aiasaiansiarslt Sink result, Boolean synchronization on Func`) - was run on the system at the end where the exception stack trace from the previous location. system. From time to time. Completer Services: Talk Aviator, Trophy, Compler Services, Task Aviator. Handlensut and Dbgr notification System.Web.Http.WebHost.SeekableBufferedRequestStream.d__0.MoveNext () (Task task) --- stack trace from the last location where the exception was thrown at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess - - end (task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (task task System.Net.Http.HttpContentMultipartExtensions.d__8.MoveNext)  


Comments