How to let an ASMX file output JSON

To receive a pure JSON string, without it being wrapped into an XML, you have to write the JSON string directly to the HttpResponse and change the WebMethod return type to void. [System.Web.Script.Services.ScriptService] public class WebServiceClass : System.Web.Services.WebService { [WebMethod] public void WebMethodName() { HttpContext.Current.Response.Write(“{property: value}”); } }

Getting RAW Soap Data from a Web Reference Client running in ASP.net

I made following changes in web.config to get the SOAP (Request/Response) Envelope. This will output all of the raw SOAP information to the file trace.log. <system.diagnostics> <trace autoflush=”true”/> <sources> <source name=”System.Net” maxdatasize=”1024″> <listeners> <add name=”TraceFile”/> </listeners> </source> <source name=”System.Net.Sockets” maxdatasize=”1024″> <listeners> <add name=”TraceFile”/> </listeners> </source> </sources> <sharedListeners> <add name=”TraceFile” type=”System.Diagnostics.TextWriterTraceListener” initializeData=”trace.log”/> </sharedListeners> <switches> <add name=”System.Net” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)