jquery - Ajax Post to Overloading c# web service method -


i have webservice in c# , works when don't overload it. when overload , post ajax, gives error.

$.ajax({     type: "post",     url: "http://localhost:6783/asd.asmx/add",     data: data,     contenttype: "application/json; charset=utf-8",     datatype: "json",     success: function (msg) {         console.log(msg);     },     error: function () {         alert("this error");     } }); 

in c#

[webmethod(messagename = "add2")] public int add(int a,int b) {     return a+b; }  [webmethod(messagename = "add3")] public int add(int a, int b, int c) {     return + b + c; } 

i added this:

[webservicebinding(conformsto = wsiprofiles.none)] 

and when test web service, works. however, doesn't work when called ajax.


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -