Recently I setup a new laptop for developing Azure solution.
The first problem is that Visual Studio 2010 must run as Administrator in order to run the local appfabric.
The second problem I ran into was the following error message given when I tried to debug the solution:
Failed to create database : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
One or more initialization actions failed. The development storage cannot be used without resolving these errors.
Default behaviour seems to be to look for a Sql Express database (more correctly it tries to create a database with Sql Express). This laptop had a default Sql Server 2008 server installed and for some reason the app fabric was not able to find it.
Here is what I did to fix it:
We need to run DsInit
The easiest way to invoke DSInit is to navigate to Start/All Programs/Windows Azure SDK 1.2/ and start Wypindows Azure SDK Command Prompt.
In the command line window type in dsinit /sqlinstance: (yes leave the instance blank).
If you have a specific instance name you need to connect to you can specify it.
This successfully installed the appfabric required database on my default Sql Server 2008 instance.