Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

How to overload a web method in ASP.NET webservice...?

1.50/5 (4 votes)
26 Aug 2011CPOL 38.3K  
How to overload a web method in ASP.NET webservice...?
Here is the solution to overload a web method in web service...

First of all, make changes in this:
C#
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]


You need to write like this:
C#
[WebServiceBinding(ConformsTo = WsiProfiles.None)]


Then make changes in webmethod.
Add messageName property to your webmethod:
C#
[WebMethod (MessageName="YourMessageName")]


After doing this, your webmethod will now be overloaded and no error will arise.

Enjoy...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)