|Request format is unrecognized for URL unexpectedly ending in /myMethodName|
|Written by Dicky|
|Monday, July 11 2011 10:46|
I build an AJAX auto-complete that utilizes JSON and AJAX call. It works fine on my local machine using Windows Server 2003 and IIS 6, however, when I push it to staging server on Windows 2008 R2 and IIS 7.5 it's giving me this error: Request format is unrecognized for URL unexpectedly ending in /myMethodName.I Google the error and all pointing to add this to your web.config:
However, it still not solve the issue. Using Fiddler and analyze the post and response traffic, it gives me another error information: Request format is invalid: application/json;
Then, I found out that I also need to add these 2 entries in my web.config.
All is good now and the auto-complete works as expected!