Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 3.11 KB

how-to-connect-to-data-in-a-service.md

File metadata and controls

58 lines (40 loc) · 3.11 KB
title description ms.date ms.topic helpviewer_keywords author ms.author manager ms.subservice
Connect to Data in a WCF Service
Connect your app to data returned from a Windows Communication Foundation (WCF) service by running the Data Source Configuration Wizard and selecting Service on the Choose a Data Source Type page.
11/04/2016
how-to
data [Visual Studio], connecting to web services
data sources, creating from web services
data [Visual Studio], reading from web services
reading data, from web services
web services, reading data
web services, as data sources
web services, connecting
ghogen
ghogen
mijacobs
data-tools

Connect to data in a WCF service

You connect your .NET Framework application to the data returned from a Windows Communication Foundation (WCF) service by running the Data Source Configuration Wizard and selecting Service on the Choose a Data Source Type page.

Upon completion of the wizard, a service reference is added to your project and is immediately available in the Data Sources window.

Note

The items that appear in the Data Sources window are dependent on the information that the service returns. Some services might not provide enough information for the Data Source Configuration Wizard to create bindable objects. For example, if the service returns an untyped dataset, no items appear in the Data Sources window upon completing the wizard. This is because untyped datasets do not provide schema, so the wizard does not have enough information to create the data source.

[!INCLUDEnote_settings_general]

Prerequisites

The WCF tools are not installed with the .NET workload; use the Visual Studio Installer to modify your installation. In the installer, choose Windows Communication Foundation under Individual Components. See Modify Visual Studio.

To connect your application to a service

  1. On the Data menu, click Add New Data Source.

  2. Select Service on the Choose a Data Source Type page, and then click Next.

  3. Enter the address of the service you want to use, or click Discover to locate services in the current solution, and then click Go.

  4. Optionally, you can type a new Namespace in place of the default value.

    [!NOTE] Click Advanced to open the Configure Service Reference dialog box.

  5. Click OK to add a service reference to your project.

  6. Click Finish.

    The data source is added to the Data Sources window.

Related content