After my previous event for VISUG about Live Mesh, I was invited to my old school for another lecture about this technology for the seniors. But since the Live Mesh CTP was no longer available since September 8th, 2009, I opted to keep this part to an introduction only on the user experience (the Live Mesh portal site).
This means I had quite some time left to throw in Windows Azure and all the connected parts like SQL Azure and the Windows Azure Platform AppFabric (also known as .NET Service before PDC09). Except for some minor problems with the strict security (ports being blocked) and two different versions (October and November) of the Windows Azure toolkit, everything was great.
These are the slides and code fragments used:
Windows Azure Services.zip (682 KB)
In the code fragments you’ll find a publisher-subscriber demo (AppFabric). If you want to start from scratch, don’t forget to add a reference to Microsoft.ServiceBus.dll which resides under %InstallDir\Microsoft .NET Services SDK (Nov 2009 CTP)\Assemblies. There are also demos for SQL Azure using a SQLDataSource and one using the Entity Framework combined with .NET Data Services.
Finally a few words on transferring your local database to SQL Azure. The easiest way (in my opinion) is to generate the scripts and execute them on your online database. There are however a few points to keep in mind when generating your scripts:
- Convert UDDTs to Base Types = True
- Script Extended Properties = False
- Script Logins = False
- Script USE DATABASE = False
- Script Data = True
After generating the script you also have to do the following steps:
- Delete all ‘SET ANSI_NULLS ON'
- Delete all ‘WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]'
Once this is all done you can change your connection (Menu Query –> Connection –> Change Connection) to SQL Azure.
Since you can’t use the ‘use database’ statement, you have to select the database in the connection properties.