none
Mono OSX Owin Web API Setup- How to setup MaxMessageSize?

    Question

  • I have an OWIN Selfhosted WebAPI with a Controller that accepts a large file as input. The code works in PC without any problems or errors. However in MONO on OSX, the message stays in hung mode in Chrome. When I supply a small size file using Base64 string, the call gets through. This helped me conclude that my file which is of size 1.5 MB is not an acceptable Base64 message size for POST on MONO with OSX.

    However I tried using maxContentSize to a gig on HttpRunTime and Also tried OWIN Middleware implementation with setting MaxRequestSizeInBytes to a Gig. Both of these did not let me POST the file still to Web API Controller and request stays in pending status.

    Please let me know, if you have any other ideas for setting up Max Message Size or know if there is something on MONO preventing file of size 1.5 MB.

    Saturday, September 10, 2016 2:22 AM

Answers

  • Hi Pritesh Ostwal,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    According to your description, your problem should be related to deploy Web API on MONO with OSX, which is not related to Visual Studio IDE.

    As far as I know, we can set the maxRequestLength in Web.config file. Please refer to the sample in following link.

    https://msdn.microsoft.com/en-us/library/e1f13641(v=vs.100).aspx

    About whether there has some limitations on MONO, I suggest you post this issue to MONO forum to get a better help. Thanks for your understanding.

    http://www.mono-project.com/community/

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 12, 2016 7:43 AM
    Moderator