Click here to Skip to main content
11,490,003 members (56,246 online)
Click here to Skip to main content

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

, 26 Aug 2011 CPOL 22.4K 9
Rate this:
Please Sign up or sign in to vote.
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:
 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

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

Then make changes in webmethod.
Add messageName property to your webmethod:
[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)

Share

About the Author

Tejas Vaishnav
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

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

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 26 Aug 2011
Article Copyright 2011 by Tejas Vaishnav
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid