Failed to load resource: the server responded with a status of 500 (Internal Server Error).Only in server I am getting <p>Below is my code, which handler is called. If I try to call it is throwing error. </p> <pre><code>$.ajaxFileUpload({ url: '../HttpHandler/AjaxFileUploader.ashx', //handler secureuri: false, fileElementId: id, dataType: 'json', data: { name: 'logan', id: 'id' }, responseType: 'json', success: function (data, status) { if (typeof (data.error) != 'undefined') { if (data.error != '') { alert(id) alert(data.error); } else { alert("File Uploaded Successfully"); } } }, error: function (data, status, e) { alert(e); } }); </code></pre>