I have the following test method:
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService()> _
Public Class DemoService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function GetCustomer() As String
Return "Microsoft"
End Function
End Class
Even with the ResponseFormat attribute added the response is still being returned as XML rather than JSON.
Thoughts appreciated.
Do you have .NET 3.5 or greater installed?
ScriptServiceAttribute is in .NET 3.5 and 4.0.
Also, clear your ASP.NET temp files, the dynamic proxy could be cached.