Archive for May, 2011

Using a EF model generated from SQL Server 2008 against SQL Server 2005

May 12, 2011 1 comment

If you have generated a SQL Server 2008 EF model and are migrating the EF to SQL Server 2005, chances are you will receive the following error

The version of SQL Server in use does not support datatype ‘datetime2′.

This is a known issue and the fix is relatively simple.

Open your edmx file, and on the top line, you can find an attribute called ProviderManifestToken, change it from 2008 to 2005 and you are good to go!

Categories: ASP.NET

Azure Access Control Service Part 2 – Prerequisites for development

May 11, 2011 1 comment

In order to start development for ACS, you will need the following

  1. Windows Identity Foundation Runtime
  2. Windows Identity Foundation SDK
  3. Visual Studio 2010

Once installed properly, you will notice a add STS reference option inside Visual Studio when you right click a web application or a website project.

To get the required link, login to your management service portal ( )

Click on Application integration under Development.

Copy the url for WS-Federation Metadata

Now to add STS to your application

  1. Right click the project and click on “Add STS”
  2. Click Next for the first screen
  3. If you are prompted for something about not secure, ignore and click ok
  4. Select “Use an existing STS”
  5. Paste the link you copied previously into the textbox
  6. Click Next until complete


Your website is now configured to use Azure ACS to perform authentication.

To test if its working correctly, add the following code inside your default.aspx.cs

        foreach(var claim in (User.Identity as Microsoft.IdentityModel.Claims.ClaimsIdentity).Claims)
            Response.Write(claim.ClaimType + ” = ” + claim.Value + “<br />”);

In case you wish to know the default claims returned by each provider




If you have noticed, YES for some reason Windows Live only returns quite useless data unlike the other providers, not sure why this is so as this makes it extremely useless.


Categories: ASP.NET, Azure

Azure Access Control Service Part 1 – How to create one?

May 11, 2011 1 comment

Azure Access Control Service (ACS) is an extension of Windows Identity Foundation (WIF) onto Windows Azure. It provides for a single access point for authentication users against various authentication providers (Live, Google, Yahoo, Facebook)

Here are the steps to enable ACS

  1. Login to Windows Azure portal (
  2. Click on “Service Bus, Access Control Service & Caching” at the bottom left of the screen
  3. Click on “Access Control” on the top left of the screen
  4. Click on “New namespace” at the top left of the screen
  5. Enter your namespace, this determines the final url (e.g abc)
  6. For country/region, select the region closest to where your customers are
  7. Click on “Create Namespace”

You will have to wait a while for the namespace to be created. Once it is done it will show the status as “Active”

Categories: ASP.NET

Block or Disable iAd Advertisements in iOS devices

May 9, 2011 Leave a comment

Step 1: Connect your iOS device on your Mac or PC.

Step 2: Search and download iAdKiller-_0.deb

Step 3: Place the .deb file in /tmp folder.

Step 4: SSH into your device and run dpkg -i /tmp/iAdsKiller.deb

Step 5: Reboot your device

Categories: Uncategorized