FineUploader Status 406 ASP.NET

459 Views Asked by At

I'm using fineuploader in a ASP.NET Web Application in order to upload files. The uploads are working in most cases. The problem is that the upload of a few files is not working, I'm getting status code 406 when the client sends the post request with the file's chunck.

I tried sending files with the same name,similar size and extension as the files that are not working and they worked so it doesnt seem to be an issue with the filename,size or extension.I couldn't find something in common between these files. I configured the chunck size for 5MB but also tried chaging to 2 MB and 10MB but they also didn't work.

Here is print of the request, can someone identify the problem and how to solve it? enter image description here

enter image description here

From the requests, it seems to be some problem with the cloudfront or IIS? I don't know much about this.

Edit: Looking at the IIS logs I found this, it seems the user is '-' for the request that returned 406, is the cs-username '-' because of the 406 or is the request 406 because of the cs-username '-'? If it's the second, what could make the user be lost like this? enter image description here

1

There are 1 best solutions below

1
Jokies Ding On

The error message 406 means either the mime type in your Accept request header is invalid for IIS or IIS server can't return data via the type in Accept header.

So please check whether IIS->World wide web services->Static Content has been installed. Please ensure the type in Accept header is also valid in IIS manager->site node->Mime Types.

Now that your client only accept application/json, please ensure your your code will return the correct reponse type.

If that's not working, please enable failed request tracing and post detail error messages in the FRT log. https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshoot-with-failed-request-tracing