carcajou
carcajou
CC#
Created by carcajou on 9/18/2023 in #help
File upload ASP .net 6
Hey, I made an asp website to try file upload. I use file streaming in order to upload large files. Problem: When uploading a file, I estimated at >30Mo (after a few manual tries) i get an error on the browser saying there was an error (website unreachable) and the file is not uploaded after clicking the button to Post. The website is not crashed and in case of re reaching the address the website can be accessed. I tried to put a breakpoint on my public async Task OnPostAsync() function but it never goes into that function and does the error on the browser. When using a smaller file it does upload without an issue. I tried multiple browser (Firefox, Chrome, Opera) but the error is the same I use a Form and a button. <form method="post" enctype="multipart/form-data"> I'm using Visual Studio I saw that i may have to define a longer length for body requests but it did not worked out options.MultipartBodyLengthLimit
7 replies