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


  • 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


  • 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.

    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.

    Best Regards,

    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