"500 internal server error" on file upload using ajaxrequest

2 answers
Thread Answer
In my project I can upload photo files by ajax request.
But while I can upload some of the files, some files can't be uploaded and ajax reuqest returns "500 internal server error" .
What could be the reason for this ?
It solved.
Thanks for your answer.
You saved my day.
It is hard to realize problems like that.
You need to increase max Json Length in web.config as;

        <jsonSerialization maxJsonLength="50000000"/>