I hope this helps . to DavidG and AlwaysLearning for insisting that the problem is server sideT I changed my server from laravel artisan to xampp and the problem is solved. I still cannot understand what was the problem if it was line endings it shouldn't happen at random times. But it is working now on xampp without any problems.
help you fix your problem from my Xamarin.Forms app I'm sending a picture and other fields to the server using HttpClient in Json format. If I send a little picture I've got with my front camera it's working fine, if I send a larger picture I've got with the rear camera it doesn't work and I always get an exception: "Excepional error". , From the stacktrace,
I hope this helps you . Ok! So this was solved by doing the following: Upgrade to latest version of Xamarin forms. Get rid of ModernHttpClient as it is not required any more due to point # 3. The functionality of ModernHttpClient (i.e Native SSL/Tls) is now built into Xamarin and can now be configured at the platform level as per below links:
First try at HTTPClient in Xamarin.Forms not working
hop of those help? Calling asynchronous method from constructor is not a good idea. This will work in console applications but not on UI applications. Because this will block the UI thread, and control never returns to the code due to deadlock. If you can call your async method in OnAppearing, it should work fine.