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

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -