Step 1: Creating a new WCF Data Service

Follow these instructions carefully to create a Data Access WCF Service for your application.

  1. From the Visual Studio main menu, select Tools | Options. In the left pane of the Options dialog, select Projects and Solutions. In the right pane select the Always show solution check box:

  2. From the Visual Studio File menu, select New | Web Site.... This launches the New Web Site dialog:

  3. Select the MM .NET WCF Data Service Template.

  4. In the Location combo box, select HTTP to run your WCF service under IIS (recommended). If this combo box is disabled, from the Visual Studio menu, select Tools | Options, then in the Options dialog, select Projects and Solutions | General. Make sure the Save new projects when created option is checked.

  5. Specify the virtual directory or folder in which you want to create your data access WCF Service.

  6. In the Language combo box, select the .NET language you want to use in your web service.

  7. Click the OK button to continue.

    Your new Web solution is displayed in Visual Studio. If you expand the App_Code node your Solution Explorer should look something like this:

    The first node in the tree view is your solution indicating it contains (1 project). The second node in the tree view is your new WCF Data Service project.

  8. Double-click the web.config file, scroll to the bottom of the file and change the <databases> settings so the web service can connect properly to your database. You can copy these settings from an existing business object, Windows Forms, or Web Forms .config file.

  9. Right-click the Service.svc file and select Set As Start Page from the shortcut menu.

  10. Rebuild and run the new Solution. It should display a test page like this:


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 10/19/10
Comment or report problem with topic