Saturday, November 15, 2008

Azure Tip: How to Get Cloud Storage Working Locally if You're Not Running SQL Server Express

If you're having trouble getting cloud storage to run locally on your box, this tip from Neudesic rock star Chris Rolon may help. It's especially likely this is your problem if the version of SQL Server you run isn't SQL Server Express.

If you're not running SQL Server Express, you'll need to change two values in the DevelopmentStorage.exe.config file which resides in C:\Program Files\Windows Azure SDK\v1.0\bin to have the correct SQL Server instance name (shown in red below).
  • The first is the DevelopmentStorageDbConnectionString value in the connectionStrings section.
  • The second is the dbServer value in the developmentStorageConfig section's third Service entry (the one named Table).

<add name="DevelopmentStorageDbConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DevelopmentStorageDb;Integrated Security=True" providerName="System.Data.SqlClient" />

<add key="ClientSettingsProvider.ServiceUri" value="" />

<service name="Blob" url=""/&gt;
<service name="Queue" url=""/&gt;
<service name="Table" url="" dbServer="localhost\SQLExpress"/>

Note that the first entry uses "." to indicate local machine while the second uses "localhost."


Andreas Öhlund said...

And if you want to build the samples using the .cmd-files included in the you have to modify the dbservername in Microsoft.CloudService.targets located in C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0

Great azure posts btw!

Andreas Öhlund said...

Forgot one thing, you have to add /server:localhost in the Microsoft.Samples.ServiceHosting.targets file that is located in the ....samples\msbuild\ directory