The Difference Between “Add Web Reference” and “Add Service Reference” in .net

521
Views
1
Answers

Hi,
I am building a simple WCF ASP.NET client in Visual Studio 2010 and wanted to make a reference to my WCF service. I can see two options “Add Web Reference” and “Add Service Reference”. What is the difference between the two?

edit | flag
William Patrick
Asked on: Jun 24, 2011 at 12:41AM

1 Answers

37
4
37

Add Web Reference is a wrapper over wsdl.exe and can be used to create proxies for .NET 1.1 or 2.0 clients. Of course this means when you are pointing to a WCF service you have to be pointing to an endpoint that uses basicHttpBinding.It is used to create ASMX web services in the past by simply selecting “Add Web Reference” and pointing to my .svc file hosted in IIS.

Add Service Reference is a wrapper over svcutil.exe and also creates clients proxies (and additionally web.config entries). These proxies, however, can only be consumed by .NET 3.0+ clients.

edit | flag
Gokul A
Answered on: Jun 24, 2011 at 12:45AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags