I have a .net web server working with Nancyfx. I have a route that should upload an image, this image is sent with the client in json byte64 encoding, as well as with other attributes. When I try to associate incoming json with my model, I got the following exception: "The maximum length of the input JSON signal is exceeded."
Something like that:
Post["/Upload", true] = async(_, ctx) => { UploadModel model = null; model = this.Bind<UploadModel >(); . . . }
I read that changing the value of "maxJsonLength" in my web.config handles this problem, but when I set it to a higher value, there is no effect:
<scripting> <webServices> <jsonSerialization maxJsonLength="50000000"/> </webServices> </scripting>
Along with maxRequestLength:
<httpRuntime targetFramework="4.5" maxRequestLength="1000000"/>
For some small images (5KB, 50KB) there is no problem with linking, but when I send photos of 144KB or higher, it causes me an error.
Any thoughts? If I missed any relevant information, just ask me
source share