Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When passing json data from client to server using jquery , i getting 400 Bad Request . When viewed json data from firebug it show to be as below :

"NetworkError: 400 Bad Request - http://localhost:61153/Handlers/CENTRALLOOKUP/RelationTypeHandler.ashx?_=1402013961605&method=SaveRelationType&args=%22%5B%7B%5C%22RelTypeID%5C%22%3A1%2C%5C%22RelTypeName%5C%22%3A%5C%22fdg%5C%22%2C%5C%22RelTypeNameEng%5C%22%3A%5C%22dfg%5C%22%2C%5C%22Status%5C%22%3Atrue%2C%5C%22FromDate%5C%22%3A%5C%222070.02.02%5C%22%2C%5C%22Action%5C%22%3A%5C%22%5C%22%7D%2C%7B%5C%22RelTypeID%5C%22%3A3%2C%5C%22RelTypeName%5C%22%3A%5C%22Father1%5C%22%2C%5C%22RelTypeNameEng%5C%22%3A%5C%22Father1%5C%22%2C%5C%22Status%5C%22%3Afalse%2C%5C%22FromDate%5C%22%3A%5C%222070.02.02%5C%22%2C%5C%22Action%5C%22%3A%5C%22%5C%22%7D%2C%7B%5C%22RelTypeID%5C%22%3A7%2C%5C%22RelTypeName%5C%22%3A%5C%22Mother%5C%22%2C%5C%22RelTypeNameEng%5C%22%3A%5C%22Mother%5C%22%2C%5C%22Status%5C%22%3Atrue%2C%5C%22FromDate%5C%22%3A%5C%222070.09.08%5C%22%2C%5C%22Action%5C%22%3A%5C%22%5C%22%7D%2C%7B%5C%22RelTypeID%5C%22%3A8%2C%5C%22RelTypeName%5C%22%3A%5C%22relation%5C%22%2C%5C%22RelTypeNameEng%5C%22%3A%5C%22relation%5C%22%2C%5C%22Status%5C%22%3Afalse%2C%5C%22FromDate%5C%22%3A%5C%222070.02.02%5C%22%2C%5C%22Action%5C%22%3A%5C%22%5C%22%7D%2C%7B%5C%22RelTypeID%5C%22%3A9%2C%5C%22RelTypeName%5C%22%3A%5C%22fdg%5C%22%2C%5C%22RelTypeNameEng%5C%22%3A%5C%22dfg%5C%22%2C%5C%22Status%5C%22%3Atrue%2C%5C%22FromDate%5C%22%3A%5C%222070.02.02%5C%22%2C%5C%22Action%5C%22%3A%5C%22%5C%22%7D%2C%7B%5C%22RelTypeID%5C%22%3A10%2C%5C%22RelTypeName%5C%22%3A%5C%22dfgdf%5C%22%2C%5C%22RelTypeNameEng%5C%22%3A%5C%22dfgfd%5C%22%2C%5C%22Status%5C%22%3Atrue%2C%5C%22FromDate%5C%22%3A%5C%22207003%5C%22%2C%5C%22Action%5C%22%3A%5C%22%5C%22%7D%2C%7B%5C%22RelTypeID%5C%22%3A15%2C%5C%22RelTypeName%5C%22%3A%5C%22fdg%5C%22%2C%5C


I am urgently in need of help . Thank in advance
Posted
Comments
Bhushan Patki 5-Jun-14 7:47am    
Did you convert data in proper Json format like these?
$.ajax({
data: JSON.stringify(DATA),
},
error: function(data) {
...
}
});

1 solution

Edit:
web.config system.webServer section and set httpErrors existingResponse attribute
<system.webserver>
    ...
    <httperrors existingresponse="PassThrough"></httperrors>
    ...
</system.webserver> 


The classic CustomErrors behaviour because I was comparing localhost with a remote server
and the first wouldn't explain how some of my other Authentication 'errors' were getting through intact

See the article
how-to-use-http-detailed-errors-in-iis[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900