Hello,
I know there are at lot information about this item, but any of them work for me(maybe, or not maybe, i am doing something wrong):
This is the WEB API and the code to avoid the error
[HttpPost]
[DisableRequestSizeLimit]
[RequestSizeLimit(100_000_000)]
[RequestFormLimits(MultipartBodyLengthLimit = 100_000_000)]
In the web.config i have
<httpruntime ..="" maxrequestlength="...">
<system.webserver>
<security>
<requestfiltering>
<requestlimits maxallowedcontentlength="524288000">
and nothing
I am using XAMARIN VS 2022, this is the api
var file = await MediaPicker.CapturePhotoAsync();
if (file == null) return;
var content = new MultipartFormDataContent();
content.Add(new StreamContent(await file.OpenReadAsync()), "file", file.FileName);
string url = "https://10.0.2.2:7254/Api/getData";
var response = await client.PostAsync(url,content);
What I have tried:
I have read at lot of information