ReadAsMultipartAsync took long time to process large file RRS feed

  • Question

  • The WCF service is receiving Multi parts of data and writing into the shared drive by using MultipartFormDataStreamProvider class 

    when writing a 150 mb file into the drive its taken 3 minutes , why its taking that long and how to troubleshoot.

    multiPartReader class is inheriting from MultipartFormDataStreamProvider 

    var provider = streamContent.ReadAsMultipartAsync(multiPartReader).Result;

    Wednesday, August 26, 2020 4:43 AM

All replies

  • Most likely the issue is in your stream provider as that is where the output is being written. Try using a simple memory stream or get rid of the provider temporarily. If it speeds up then it is your provider. A 150MB file is pretty big and exceeds the default limits allowed in WCF/REST calls by default. So it is possible that it is an issue with the size.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, August 26, 2020 3:20 PM
  • Thank you .

    I have tested 170 mb file in the non prod environment which taken only 0.26751667.

    It was  delay between IIS and shared folder , the IIS return 200 success response to the caller

    Friday, August 28, 2020 10:41 PM
  • Hi kapil kumar velpuri,
    I am glad you have got your solution. We appreciated you shared us your solution. And we also hope you can mark it as an answer. By marking a post as Answered, you help others find the answer faster.
    Best Regards,
    Daniel Zhang

    "Windows Forms General" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows Forms General" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Tuesday, September 1, 2020 8:18 AM