a small but very annoying problem. I am trying to use jQuery JSON call with asp.net web service. It all works fine with the below HttpModule if I call the web service without any arguments. As soon as I try and send a value from the client side, Module gets executed but the process doesn't pass over to the actual webservice method and returns with a server side 500 error. If we remove the module from the middle, then the method gets executed perfectly fine with parameter but then the response comes back in the XML format instead of JSON so we are helpless to use the Module.----------- Jquery Call ---------------------\[code\] var dd = { 'name': 'pakistan' }; $(document).ready(function () { $.getJSON("http://localhost:59271/Testing/shows-app.asmx/HelloWorld?callback=?", dd, function (data) { val = JSON.parse(data.d) $("#content").html(val.response); }); });\[/code\]------------ HttpModule -------------\[code\] private const string JSON_CONTENT_TYPE = "application/json; charset=utf-8"; public void Dispose() { } public void Init(HttpApplication app) { app.BeginRequest += OnBeginRequest; app.EndRequest += new EventHandler(OnEndRequest); } public void OnBeginRequest(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpRequest request = app.Request; //Make sure we only apply to our Web Service if (request.Url.AbsolutePath.ToLower().Contains("-app.")) { var method = app.Context.Request.Headers["REQUEST_METHOD"]; if (string.IsNullOrEmpty(app.Context.Request.ContentType)) { app.Context.Request.ContentType = JSON_CONTENT_TYPE; } app.Context.Response.Write(app.Context.Request.Params["callback"] + "("); var method2 = app.Context.Request.Headers["REQUEST_METHOD"]; } } void OnEndRequest(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpRequest request = app.Request; if (request.Url.AbsolutePath.ToLower().Contains("-app.")) { app.Context.Response.Write(")"); app.Context.Response.ContentType = "application/json"; } }\[/code\]----------- Webservice ---------------------\[code\][WebMethod][System.Web.Script.Services.ScriptMethod(UseHttpGet = true, ResponseFormat = System.Web.Script.Services.ResponseFormat.Json)]public string HelloWorld(string name){ var json = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(new { response = "Pakistan " + " Zindabad" }); return json; //string jsoncallback = HttpContext.Current.Request["callback"]; //return string.Format("{0}({1})", jsoncallback, json);}\[/code\]Please remember that, if we remove the module from the middle, then the method gets executed perfectly fine with parameter but then the response comes back in the XML format instead of JSON so we are helpless to use the Module.Thanks a bunch in advance.