Preparing the SQL Azure Server
To publish an application to Windows Azure, your database must also be on the cloud. This means that you need to publish your database to SQL Azure, the database engine that's part of the Windows Azure platform. Fortunately, Visual Studio LightSwitch does this job for you, as I'll discuss a little later.
At this point, you need to set up a new SQL Azure server. The first thing to do is access the Windows Azure Management Portal. (You'll be required to enter with the Microsoft account you associated to the Azure subscription.) After logging in, follow these steps:
- Click SQL Databases on the left.
- In the SQL Databases workspace, select Servers.
- In the toolbar at the bottom of the page, click Add.
- Specify the server's administrator credentials and the nearest location to you (see Figure 1).
Figure 1 Creating a new SQL Azure server.
In a few seconds, the new server will be ready. For security reasons, the IP address of your machine must be added to the list of allowed IP addresses for SQL Azure:
- Click Manage in the bottom toolbar.
- The Management Portal will ask if you want to allow your IP address, as shown in Figure 2. (My server name is hidden in Figure 2 for privacy.) Click Yes.
- The next question will ask if you want to go to the management page of your SQL Azure server. We'll skip this step, so select No.
Figure 2 Allowing your IP address to connect to SQL Azure.
Now that you have the database server ready, you can start the process of publishing your app to Windows Azure.