4 ms·
I think it's just the ASP.Net AJAX Toolkit not plain ASP.Net or ASP.Net MVC.
by arethuza 15y ago
I think it's just the ASP.Net AJAX Toolkit not plain ASP.Net or ASP.Net MVC.
- alanning 15y agoThanks, I should have clarified. Here is the breakdown according to Phil's post linked below: ASP.NET ASMX Web Services, WCF Web Services, and the now-defunct ASP.NET AJAX automatically wrap with {'d':...}. ASP.NET MVC does not. Phil explains that the reason there is a difference is that with MVC there is no common client library that automatically strips the {'d':...} wrapper. So they felt it would be too confusing for users. http://haacked.com/archive/2009/06/25/json-hijacking.aspx http://haacked.com/archive/2009/06/25/json-hijacking.aspx That was an old article so maybe they have changed the default behavior since then. In any case, you can manually wrap the response with {'d':...}.