czwartek, 17 listopada 2011

Import Contacts From Gmail, Yahoo, Hotmail Asp.Net

Import contacts from Gmail, Yahoo, Hotmail.

I spend a few days to configure how to import contacts in my application. You can find a lot of information in
internet, but it very hard to find something really handy. I won't describe step by step how you can do that. You can
download project and check it yourself. To make it works in Visual Studio you need to add host
entry "" to C:\Windows\System32\drivers\etc\hosts (You need to have port 80 free on your local IIS).
When you start the project change url from  localhost to and it should work.

All needed dlls should be in project, but if somebody want to create project from scratch I will describe few main steps:


1. Register your application to get consumer key and consumer secret
    Don't forgot to change prermision to read Contacts
2. Download and extract DotNetOpenAuth- from
3. Add DotNetOpenAuth.dll to project references
4. Download file OAuthBase.cs from and add to project


1. Register your application to get Client ID and Client Secret
2. Download and install Windows Live ID Delegated Authentication SDK 1.2
3. Add file windowsLiveLogin.cs to Project. It should be in C:\Program Files\Windows Live ID\DelAuth\App_Code


1. Register your application to get Client ID and Client Secret
2. Download Google_Data_API_Setup_1.9.0.0.msi from
3. Add references Google.GData.Client, Google.GData.Contacts, Google.GData.Extensions to Project. Files should be in folder C:\Program Files\Google\Google Data API SDK\Redist

If this post help you , you can buy me a beer.