Windows Azure SDK 1.4 Storage Emulator and SQL Server 2008 R2 Developer

August 24, 2011 at 12:09 pm 1 comment

This week I started a Microsoft training on Windows Azure. I am really interested in cloud technologies and how can products like BizTalk and SharePoint seamlessly integrate with them so as soon as I got word of this courses I signed in.

The first activity was to setup de Windows Azure SDK and build a simple project. As I already had a VM with Windows Server 2008 Enterprise, SQL Server 2008 R2 Development and Visual Studio 2010 Ultimate I just needed to download the Windows Azure SDK and proceed with the instructions to create the ASP.NET Web Role project.

Everything went smoothly, the SDK installed without a glitch and I proceeded to create the ASP.NET Web Role project. The first problem arise went I tried to debug the application for the first time. As soon as I hit the Debug button the following warning message regarding the Storage Emulator was displayed:

image

I opened the Output window and found a couple of these:

“Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Development Storage: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Development Storage using the ‘DSInit’ utility in the Windows Azure SDK.”

Because of the reference of a SQLExpress named instance in the error description I suspected this had to do with the fact that I was using SQL 2008 Developer instead of Express. I took a look at the Windows Azure SDK documentation at MSDN and found out I was right:

By default, the storage emulatorruns against an instance of SQL Express. To configure it to run against a local instance of SQL Server instead, call the DSInit tool with the /sqlInstance parameter, passing in the name of the target SQL Server instance. Use the name of the SQL Server instance without the server qualifier (e.g., MSSQL instead of .\MSSQL) to refer to a named instance. Use "." to denote an unnamed or default instance of SQL Server.

You can call dsInit /sqlInstance at any time to configure the storage emulator to point to a different instance of SQL Server.”

I did as instructed and ran the DSInit command in my VM: DSInit /sqlinstance:.

image

image

This action properly configured the Storage Emulator to work with my SQL Server 2008 Developer installation and now this component started ok.

image

Keep in mind however that before doing this you should make sure the following conditions are met::

1.- Your SQL Server installation has TCP/IP protocol enabled.

image

2.- Your Windows Firewall is properly configured to allow connections to be made to the TCP Port in which SQL Server is listening.

image

3.- Your SQL Server Instance is configured to allow remote connections.

image

There are other factors that could be responsible for connections not able to being made to the SQL Server instance but this three are by far the most common. By taking into account these considerations you should avoid getting this nasty error:

image

Now that I was ready to debug my project I expected everything to run smoothly but another error stood in my way:

image

This time it was something easier. Because I was using the Visual Studio 2010 ASP.Net Development Server the application was trying to access SQL Server to create a session database with the default credentials of the IIS Service. To overcome this you simply need to enable impersonation in the web.config of your application and configure a windows account with the proper permissions in SQL Server:

<identity impersonate="true" userName="" password=""/>

Finally everything went as planned and my application was up and running without a glitch

image

Advertisements

Entry filed under: Windows Azure. Tags: , , , , , .

Redmond’s 2011 Windows IT Salary Survey New user interface and file management capabilities of Windows 8

1 Comment Add your own

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


August 2011
M T W T F S S
« Jul   Sep »
1234567
891011121314
15161718192021
22232425262728
293031  

Categories


%d bloggers like this: