locked
Output ASMX in JSON in .NET Framework 4.5 RRS feed

  • Question

  • User977690511 posted

    I have a .NET Framework 4.5 ASP.NET web form project in VS 2012. 

    I added an asmx page to the project for web methods.  The web service class is already marked with the [System.Web.Script.Services.ScriptService] attribute.  What changes must I do in web.config to make my web methods output in JSON?  The client is sending Accept: application/json but the output of each web method is still in Xml.  The current web.config generated by VS 2012 has no <handlers> section.

    Thanks.

    Saturday, February 2, 2013 10:24 AM

Answers