Share via


Adding a Web Reference to a VS 2008 Windows Forms Project

 

First, we will see how to add a web service in VS2005, and then we will see what changed in VS2008 orcas.

VS2005

In Visual 2005 (Whidbey), adding a Web Reference is pretty straight forward.

From Project -> Add Web Reference ..., (From Solution Explorer, Right Click on Project, From the drop down Menu, Select Add Web Reference)

Add Web Reference Dialog Comes up.

In the Text box for URL, you specify url for the Web Service.

Click Go

Then a preview of the service is shown.  You have the option of renaming the service.

Click the "Add Reference ..." Button.

Web Service is added to the solution.  You can see it under "Web References"

What Changed in Orcas

From Project -> Add Service Reference ..., (From Solution Explorer, Right Click on Project, From the drop down Menu, Select Add Service Reference)

Click Advanced Button

 

Service Reference Setting Dialog Comes up. Click "Web Reference" button here.   Web Reference dialog comes up. The rest of the steps are same as in VS2005

Comments

  • Anonymous
    October 16, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/10/17/adding-a-web-reference-to-a-vs-2008-windows-forms-project/

  • Anonymous
    October 29, 2007
    In this post, I describe how to create a WebService that returns a DataSet, deploying the web service,

  • Anonymous
    May 04, 2008
    is that possible to create the web reference with lines of code?

  • Anonymous
    June 12, 2008
    The comment has been removed

  • Anonymous
    July 08, 2008
    It saved me tons of time trying to find how I can add a web reference in VS 2008. Thanks a lot!

  • Anonymous
    September 02, 2008
    The comment has been removed

  • Anonymous
    September 05, 2008
    The comment has been removed

  • Anonymous
    October 04, 2008
    Is there a reason that it's buried now? It seems that Web References are being phased out, based on the fact that you can add one only as an advanced "compatibility" option... So is it preferred practice now to use a Service Reference as opposed to a Web Reference? What's the difference between the two? thanks -

  • steve
  • Anonymous
    October 22, 2008
    Thank u !!! actually i m searching for Add Web Reference  option

  • Anonymous
    November 06, 2008
    Awesome, Naga. Thanks - I spent six hours trying to figure out how to do this. And now stuff works. You rock.

  • Anonymous
    March 14, 2009
    When i was trying to add a web reference, it says none though i had two web methods in my web service. None - No Web services were found in the current solution. Can you help me quickly?

  • Anonymous
    March 14, 2009
    The comment has been removed

  • Anonymous
    May 07, 2009
    Thanks for this article, this has got me on the right track.