Click here to Skip to main content
15,885,366 members
Articles / Web Development / ASP.NET
Tip/Trick

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

Rate me:
Please Sign up or sign in to vote.
1.50/5 (4 votes)
26 Aug 2011CPOL 36.6K   9   8
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)


Written By
Software Developer (Senior)
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
Strange_Pirate29-Sep-12 0:12
Strange_Pirate29-Sep-12 0:12 
GeneralMy vote of 1 Pin
Strange_Pirate29-Sep-12 0:08
Strange_Pirate29-Sep-12 0:08 
QuestionSuggestion For You Sir Pin
Strange_Pirate28-Sep-12 2:10
Strange_Pirate28-Sep-12 2:10 
QuestionQuestion Pin
Strange_Pirate28-Sep-12 2:03
Strange_Pirate28-Sep-12 2:03 
GeneralReason for my vote of 1 kuch hai bhi Pin
Bhupender Singh20-Oct-11 23:55
Bhupender Singh20-Oct-11 23:55 
GeneralReason for my vote of 1 not proper description and example Pin
shyam270716-Oct-11 8:09
shyam270716-Oct-11 8:09 
GeneralReason for my vote of 3 Could use more detail outlining the ... Pin
BrianBissell30-Aug-11 3:51
BrianBissell30-Aug-11 3:51 
GeneralReason for my vote of 3 Should have made the problem your so... Pin
BrianBissell30-Aug-11 3:22
BrianBissell30-Aug-11 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.