Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a Web reference Visual Studio 2012

People also ask

How do I add a Web reference in Visual Studio 2010?

In Solution Explorer, right-click the name of the project to add the Web service to and then click Add Web Reference. The Add Web Reference dialog box is displayed. In the URL box, enter the URL of the Web service to use.


check the link below

MSDN Link

To add a Web reference to a project

1 In Solution Explorer, right-click the name of the project that you want to add the service to, and then click Add Service Reference.

The Add Service Reference dialog box appears.

2 In the Add Service Reference dialog box, click the Advanced button.

3 The Service Reference Settings dialog box appears.

4 In the Service Reference Settings dialog box, click Add Web Reference.

The Add Web Reference dialog box appears.


Solved. CheckBox "Always generate message contracts" Helped. Thanks for all.


From MSDN:

  1. In Solution Explorer, right-click the name of the project that you want to add the service to, and then click Add Service Reference. The Add Service Reference dialog box appears.

  2. In the Add Service Reference dialog box, click the Advanced button. The Service Reference Settings dialog box appears.

  3. In the Service Reference Settings dialog box, click Add Web Reference. The Add Web Reference dialog box appears.

Hope this helps!


Visual Studios 2013 uses newer version of .NET Framework 4.5.1, which will not work with this web service http://wsf.cdyne.com/weatherws/weather.asmx and others. but using .NET 3.5 works!

so, if your starting a new project select from drop down menu .NET Framework 3.5 or if you are already in a project and want to change Framework

1 Click [DEBUG] > '<YOUR_PROJECT_NAME>' Properties

2 Click [Build] and change target Framework

3 Click [OK]