Exercise 3: Enabling OData Access to a SQL Azure Database

In this exercise, you will enable OData access to the SQL Azure database.

Task 1 – Enabling OData Access

In this task, you will open the lab solution in Visual Studio 2010.

  1. Open Internet Explorer, and go to https://www.sqlazurelabs.com.
  2. In left menu, click SQL Azure OData Service.
  3. Login using your Windows Azure credentials.
  4. In the Connection Information section, in the Server Name textbox, enter the Fully Qualified DNS Name for the SQL Azure database server created in exercise 2.
  5. In the Connection Information section, enter your SQL Azure administrator password.

    Figure 11

    Configure OData Service Connection

  6. Click Connect.
  7. In the Database Information section, in the Database dropdown list, select PartsInventory.
  8. Check the Enable OData checkbox.
  9. In the User Mapping section, in the Anonymous User Access dropdown list, select dbo.

    Figure 12

    User Mapping for the OData Service

    Note:
     The Windows Phone 7 application uses the URL displayed at the bottom of the web page to interact with the PartsInventory SQL Azure database.