EnjoySharePoint YouTube Channel

System.InvalidOperationException:Cannot have two operations in the same contract with the same name

This error comes when I do method overloading in WCF in C#.Net. When i implement two methods having the same name in WCF I get an error “System.InvalidOperationException:Cannot have two operations in the same contract with the same name”.

Get Office 365 Enterprise E3 Or Business Premium Subscription & Try out all the features

So to solve this error we have to implement these two method Using NAME paramerter like below.

public interface IService1

string DisplayData(int value);

string DisplayData(string value);

Also, you can check out my previous posts on:
Check out Best Alternative to InfoPath -> Try Now
You May Also like the Following SharePoint Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →