Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

9.10. Connecting to a WCF Endpoint

When VWD creates a Windows Communication Foundation service, it makes the service discoverable by clients. You can see the Web Service Description Language (shortened to WSDL and pronounced wizz-dell in geekspeak) details by tacking on a query string to the URL:

http://www.kjopc.com/service.svc?wsdl

Everything you need to know about connecting to the service is in the WSDL definition. Fortunately, the built-in tools decipher it for you and create whatever else you need to connect.

Follow these steps to connect to the WCF service:

  1. Choose WebsiteAdd Service Reference.

    The Add Service Reference window appears.

  2. In the Address text box, enter the URL of the daylight saving WCF service (for example, http://www.kjopc.com/service.svc) and click Go.

    The utility downloads the service information (this step can be slow) and lists the available services and operations, as shown in Figure 9-5.

  3. Accept the default values in the Add Service Reference window and click OK.

    VWD puts several files into a new folder called App_WebReferences.

  4. Open the web.config file and locate the <system.serviceModel> element and within it, the <client> element.

  5. In the <endpoint> element, check that the address value is pointing to the URL where the service is located and fix it, if necessary.

    For example, the endpoint address for my service is

    <endpoint address="http://www.kjopc.com/service.svc" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book