Web Service Reference in Visual Studio 2010

If you’ve used Visual Studio 2008 or 2010, you’ll notice that Web Reference is no longer there (like in VS 2005 and previous), instead, you see Service Reference – actually, it’s STILL there, just hidden!

So, what’s the difference?  Well, according to this post:

Add Web Reference is the old-style, deprecated ASP.NET webservices (ASMX) technology (using only the XmlSerializer for your stuff) – if you do this, you get an ASMX client for an ASMX web service. You can do this in just about any project (Web App, Web Site, Console App, Winforms – you name it).

Add Service Reference is the new way of doing it, adding a WCF service reference, which gives you a much more advanced, much more flexible service model than just plain old ASMX stuff.

So, how do you access it?  Simple — right-click on Service References in the Solution Explorer window and…

image

Click on “Advanced…”

image

Then click on “Add Web Reference…”

image

Voila!  You can now consume the web service like you did pre-Visual Studio 2008 era.  Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.