jquery - Moved MVC3 app from IIS 6 to IIS 7.5 - Ajax response value is different? -
i have action returns nothing in circumstances. action in in these cases:
[httpget] [nocache] public jsonresult search(searchcriteriamodel search) { var searchresults = searcher.performsearch(search); //searchresults == null return json(searchresults, jsonrequestbehavior.allowget); } this invoked jquery:
$.ajax({ url: "the url", type: "get", data: {search criteria}, success: function(response) { /* in iis6 'response' === '' in iis7.7 'response' === null, causing error later */ } }); in ii6 response empty string. in iis7.5 response null.
why script seeing difference?
and
how can configure iis7.5 script sees empty string response, , continues work properly?
additional - visual studio web server returns empty string well. same exact folder setup iis7.5 application returns null.
the response visual studio web server empty string value:
http/1.1 200 ok server: asp.net development server/10.0.0.0 date: mon, 10 mar 2014 19:22:29 gmt x-aspnet-version: 4.0.30319 x-aspnetmvc-version: 3.0 cache-control: no-cache pragma: no-cache expires: -1 content-length: 0 connection: close the response iis7.5 null value:
http/1.1 200 ok cache-control: no-cache pragma: no-cache content-type: application/json expires: -1 server: microsoft-iis/7.5 x-aspnetmvc-version: 3.0 x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: mon, 10 mar 2014 19:22:32 gmt content-length: 0
switch application pool asp.net v4.0 asp.net v4.0 classic , content-type no longer sent:
http/1.1 200 ok cache-control: no-cache pragma: no-cache content-length: 0 expires: -1 server: microsoft-iis/7.5 x-aspnet-version: 4.0.30319 x-aspnetmvc-version: 3.0 x-powered-by: asp.net date: mon, 10 mar 2014 19:37:28 gmt
Comments
Post a Comment