The web method is as under using System; using System.Collections.Generic; using System.Linq; using System.Web.Services; public partial class CascadingDropDown : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PopulateCountry(); } } private void PopulateCountry() { DataSource ds = new DataSource(); ddlCountry.DataSource = ds.GetCountryList(); ddlCountry.DataValueField = "Country
here for a quick overview of the site Help Center Detailed answers to any questions you might have
Unknown Web Method Parameter Name Methodname
Meta Discuss the workings and policies of this site About Us
Webmethod C#
Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads failed to load resource: the server responded with a status of 500 (internal server error) with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, http://stackoverflow.com/questions/6703689/calling-web-method-from-jquery-ajax-errorinternal-server-error just like you, helping each other. Join them; it only takes a minute: Sign up Getting a internal server error when using Jquery ajax post method up vote 0 down vote favorite I have the following javascript code for an autoselect dropdownlist with multiselect checkbox: function f() { var data; $("#csrch").attr('value', ''); $.ajax ({ //calling aspx http://stackoverflow.com/questions/21432573/getting-a-internal-server-error-when-using-jquery-ajax-post-method web method url: 'drpCtrl.aspx/CustomerFilter', type: 'POST', //since webmethod does not have parameter given data as empty data: '', datatype: 'json', contentType: 'application/json', mimeType: 'application/json', error: function (jqxhr, status, error) { alert(error) } }); } Which is calling this web method from the code behind page [WebMethod] public string CustomerFilter() { string result = ""; //retrieving customer list from database where it returns as json format result = Convert.ToString(objSLA.ExecuteScalar (CommandType.StoredProcedure, "Usp_Get_Customer_Test")); //returning string format return result; } Webmethod CustomerFilter() is not calling and I am getting the Internal Server Error..Please help what is wrong in above said coding result: { "uin":{ "customer":[ { "i":"1", "n":"Ahold Financial Services" }, { "i":"2", "n":"ALM" }, { "i":"3", "n":"Associated Global Systems, Inc." } ] } } jquery json share|improve this question edited Jan 29 '14 at 16:37 jcolebrand 13.4k65396 asked Jan 29 '14 at 13:30 user3248877 12 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote try adding the static at you Codebehind Method: [WebMet
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About http://stackoverflow.com/questions/15387580/500-internal-error-on-jquery-web-method-call-iis-5-1-yea-i-know Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 Internal Error on jQuery Web internal server Method Call - IIS 5.1 ( :-/ yea i know…) up vote 3 down vote favorite i can't figure out what i'm missing, is there an IIS Setting that needs to be changed, possibly? $(document).ready(function () { function AjaxSuccess(result) { alert('result: ' + result); } function AjaxError(result) { alert("error"); alert(result.status + ' ' + result.statusText); } $(".hlp").click(function () { var myVal= $(this).val(); var id = $(this).attr('id'); internal server error $.ajax({ type: "POST", url: "AjaxWebMethods.aspx/GetHelpText", contentType: "application/json; charset=utf-8", data: "{'helpText' : '" + id + "'}", dataType: "json", success: AjaxSuccess, error: AjaxError }); }); }); my web method is as follows: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class AjaxWebMethods : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){ } #region Exposed WebMethods [System.Web.Services.WebMethod()] public string GetHelpText(string helpItem) { string helpText = "testing web method"; return helpText; } #endregion } i keep getting 2 pop ups "error" and then the 501 error. please help me figure this out. c# jquery asp.net webmethod iis-5 share|improve this question edited Mar 13 '13 at 14:12 asked Mar 13 '13 at 14:06 Madam Zu Zu 1,760144093 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted you need to change this line data: "{'id' : '" + id + "'}", to data: "{'helpItem' : '" + id + "'}", as webmethod is taking helpItem as parameter name. so ajax function finally wil be $.ajax({ type: "POST", url: "AjaxWebMethods.aspx/GetHelpText", contentType: "application/json; charset=utf-8", data: "{'helpItem' : '" + id + "'}", dataType: "json", success: AjaxSuccess, error: AjaxError }); and