Monday, December 10, 2007

OpenContacts 1.0 release (with Live/Hotmail support)

OpenContacts 1.0 with Live support has released.

https://sourceforge.net/project/showfiles.php?group_id=210092&package_id=252191&release_id=560658

Now supported:
  1. Import Google Mail contacts
  2. Import Yahoo Mail contacts
  3. Import Live contacts/Hotmail contacts
Thanks

115 comments:

frik0 said...

dude, this works fine with gmail and yahoo... but live didnt work at all..

did i need to registrate my web application right?

i've been reading about all this stuff about contact live but its a pain in the ass..

did this work for u just compiling? did u do something else?

greetz

jc fkjc(at)hotmail.com

gnilly boy said...

It works for me. I've just test xx@live.com account.

Try test application
OpenContactsNet.Test.exe xx@live.com pass

Thanks

Ashu said...

Even with yahoo accounts I suppose it would work with
anyusername@yahoo.com

It will not work with anything like username@yahoo.co.uk
or
username@yahoo.co.in etc

Correct me if I am not.

Any solutions for that?

Ahmed said...

really it's a good Dll but there was some errors in grabbing Hotmail Contact List . so, i had made some changes in its code and now it imports Hotmail Contact List succesfully :) :)

how can i upload new code for you ?!!

gnilly boy said...

Ahmed Thanx

Could you post your code here?

Anita said...

Hey,

Can you please help me to grab address book of Myspace and Facebook?

With regards
Anita

James said...

Great utility, but I too had the same msn hotmail / live problem, just fails - Ahmed - could you please post your solution to it?

Lee said...

Hi people. Here's the fix i'm using to get the hotmail contacts list.

Open the LiveExtract.cs file. Find:

======================
XmlNode firstName = node.SelectSingleNode( "Profiles/Personal/FirstName" );
XmlNode lastName = node.SelectSingleNode( "Profiles/Personal/LastName" );
XmlNode firstMail = node.SelectSingleNode( "Emails/Email/Address" );

MailContact mailContact = new MailContact();
mailContact.Name = string.Format( "{0} {1}", firstName.InnerText, lastName.InnerText );
mailContact.Email = firstMail.InnerText;
list.Add( mailContact );
======================

and replace with:

======================
string firstName = node.SelectSingleNode( "Profiles/Personal/FirstName") != null ? node.SelectSingleNode("Profiles/Personal/FirstName").InnerText : null;
string lastName = node.SelectSingleNode("Profiles/Personal/LastName") != null ? node.SelectSingleNode("Profiles/Personal/LastName").InnerText : null;
string email = node.SelectSingleNode("Emails/Email/Address") != null ? node.SelectSingleNode("Emails/Email/Address").InnerText : null;

if (!string.IsNullOrEmpty(email))
{
MailContact mailContact = new MailContact();
mailContact.Name = string.Format("{0} {1}", firstName, lastName);
mailContact.Email = email;
list.Add(mailContact);
}
======================

The problem i found was that the firstName and lastName nodes did not exist and for some people the email node did not exist.

Hope this helps.

gnilly boy said...

Thanks lee,
I'm going to publish library with hotmail fix shortly.

Fish said...

Excellent job! Kudos to you for realeasing open source software, I have great respect for people who do. Do you have any plans to import aol/aim contacts somehow?

Thanks!

skasim said...

Hello,
Heed help

I am using your OpenContacts 1.0 with gmail support. I have one issue if you can help me.

I use your script to login to Gmail once I login I redirect to http://mail.google.com/mail which is not allowing me to login I see a cookie and it says
LSID=EXPIRED
LSID=EXPIRED

Is that is the reason my login is not acceptable to gmail and how I can fix it ?

Phil said...

Excellent work. Using it...loving it! However just one thing the utilties dll referenced within the project is not strongly named and is giving me errors when building on vista machines. Any chance of getting your references signed? Or getting hold of the source? Ta.

Zulfikar Ali said...

Very cool. I trying to use it in asp .net. But extract funtion is always returning "false"

Dim list As MailContactList = Nothing
Dim res As Boolean = False
If chkGmail.Checked = True Then
Dim extractor As New GmailExtract()
res = extractor.Extract(New NetworkCredential(txtUser.Text, txtPass.Text, "gmail.com"), list)
End If

I have checked username/pass couple of times. No issue there. Anyone experiecned this issue?

Aitch Emcee said...

Lee:

The changes worked like a charm.

-Thanks

Ramky said...

Hii
You can have a same functionality of apps here in asp.net2.0 with Ajax...
http://ramcrishna.blogspot.com/2008/09/reading-contactsaddress-book-from-yahoo.html

vijay vishwakarma said...

HI,

When I m trying to import contacts from hotmail address book, its giving me error 404.

Can you help me out with this?

Aitch Emcee said...

@vijay vishwakarma,
I never had any problems like this. You need to either publish some of your code, or be more specific. Also, see some of the other comments. The hotmail component will need a little tweaking.

vijay vishwakarma said...

Hi,

Thanks for the reply.

here is my code.

protected void Button1_Click(object sender, EventArgs e)
{
MailContactList ml = new MailContactList();
LiveExtract l = new LiveExtract();
bool res = false;
try
{
res = l.Extract(new NetworkCredential(TextBox1.Text.Trim(), TextBox2.Text.Trim(), "hotmail.com"), out ml);

if (res.Equals(true))
{
Label1.Text= "Ok";
}
else
{
Label1.Text="NOT Ok";
}
}
catch(Exception ex)
{
Response.Write(ex.Message.ToString());
}

}


Here is the class for hotmail importer.



public class LiveExtract : IMailContactExtract
{
#region IMailContactExtract Members

public bool Extract( NetworkCredential credential, out MailContactList list )
{
list = new MailContactList();

bool result = false;

try
{
TicketAcquirer ticketAcquirer = new TicketAcquirer();
string ticket = ticketAcquirer.GetTicket( credential );
if ( string.IsNullOrEmpty( ticket ) )
{
return false;
}

UriBuilder urib = new UriBuilder();
urib.Scheme = "HTTPS";
urib.Path = string.Format( "/{0}/LiveContacts", credential.UserName );
urib.Host = "cumulus.services.live.com";
//urib.Host = "service.live.com";
//urib.Host = "livecontacts.services.live.com/@C@";
urib.Port = 443;

// string contactsUri = "https://livecontacts.services.live.com/@C@" + credential.UserName + "/REST/LiveContacts/Contacts";

HttpWebRequest request = ( HttpWebRequest ) WebRequest.Create( urib.Uri );

string authHeader = string.Format( "WLID1.0 t=\"{0}\"", ticket );
request.Headers.Add( "Authorization", authHeader );
//request.Method = "GET";

//string contactsUri = "https://livecontacts.services.live.com/@C@" + Int64.Parse(CToken.LocationID, System.Globalization.NumberStyles.HexNumber) + "/REST/LiveContacts/Contacts";

WebResponse response = request.GetResponse();
if ( response.ContentLength != 0 )
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load( response.GetResponseStream() );
XmlNodeList contacts = xmlDocument.SelectNodes( "/LiveContacts/Contacts/Contact" );
foreach ( XmlNode node in contacts )
{
//XmlNode firstName = node.SelectSingleNode( "Profiles/Personal/FirstName" );
//XmlNode lastName = node.SelectSingleNode( "Profiles/Personal/LastName" );
//XmlNode firstMail = node.SelectSingleNode( "Emails/Email/Address" );

//MailContact mailContact = new MailContact();
//mailContact.Name = string.Format( "{0} {1}", firstName.InnerText, lastName.InnerText );
//mailContact.Email = firstMail.InnerText;
//list.Add( mailContact );

string firstName = node.SelectSingleNode("Profiles/Personal/FirstName") != null ? node.SelectSingleNode("Profiles/Personal/FirstName").InnerText : null;
string lastName = node.SelectSingleNode("Profiles/Personal/LastName") != null ? node.SelectSingleNode("Profiles/Personal/LastName").InnerText : null;
string email = node.SelectSingleNode("Emails/Email/Address") != null ? node.SelectSingleNode("Emails/Email/Address").InnerText : null;

if (!string.IsNullOrEmpty(email))
{
MailContact mailContact = new MailContact();
mailContact.Name = string.Format("{0} {1}", firstName, lastName);
mailContact.Email = email;
list.Add(mailContact);
}
}
}
result = true;
}
catch
{
}
return result;
}

#endregion
}



The problem is with this line:
WebResponse response = request.GetResponse();

I m always getting response from server as error 404.

Please help me out.

Regards

Harold Campbell said...

I'm not sure it's your code. I just pulled mine from my local SVN repository and it also no longer works.

Harold Campbell said...

@vijay vishwakarma,
I'm not sure it's your code. I just pulled mine from my local SVN repository and it also no longer works.

A better approach may be to use Microsoft's API to authenticate/get user contacts.

vijay vishwakarma said...

Hi,

Its your code only.

I have just modified to fix hotmail bug.

Something is wrong with cumulus.services.live.com.

I googled a lot and got post with same error which I m getting..

Regards

Harold Campbell said...

ahmmm....I'm not sure I follow what you are saying.

"...Its your code only..."

What's wrong with my code?

"...I have just modified to fix hotmail bug..."

So you have fixed your code? Then publish the fix.

"...Something is wrong with cumulus.services.live.com.
I googled a lot and got post with same error which I m getting..."

But even so, you are still getting an error?

vijay vishwakarma said...

I have downloaded the source code from http://sourceforge.net/.

I read the posts here for hotmail bug. Gmail and yahoo worked in one attempt but for hotmail as per the post I replaced a few lines.

I created the object of liveextract to extract email, passed values.Ticket was generated, but when reading the webresponse, I got exception ERROR 404.

The url for hotmail cumulus.services.live has some problem. I m just not getting that.

Alternatively I will try microsoft live api for this.

Regards

crack said...

hi vijay,

a month before hotmail was working fine. it imports contacts.

but now i am having the same issue with hotmail. i am getting the internal server (500) error.
there before i was getting ssl policyexpired error. i fiexed it.
( at web request)

i tried with microsoft live api. but there is no silent login (log in through programatically)

if you have code then please post it here.

my mail id: nandhucbm@hotmail.com

thanks.
regards,
Nanda

Nyceane said...

crack, I am getting same problem, if you have a good ways of solving it please let me know.

Thanks

sunil said...

HI Friends, The code is not working with Hotmail but its working fine with yahoo and gmail. I found some errors when trying to import hotmail contacts. Can anybody post the code for hotmail. Hi Ahmed, I read your blog, Could you please post your solution to my mail id
msunil.iitkgp@gmail.com

Ahmed said...

hi Sunil ,
i sent you the Code Project which i made changes in it .
i hope it can help you

YoKeSe said...

Please Ahmed send me it too please

Ahmed said...

hi Yokese
i dont have you email !!
and i would like to publish this code to be available for all users.
can i do this ????

YoKeSe said...

You can upload to megaupload into a zip also you can upload it to rapidshare.com

YoKeSe said...

Ahmed you can sendme email

http://services.nexodyne.com/email/icon/01peAG6p/zqPXEe0%3D/R01haWw%3D/0/image.png

click in the linf (image contains my email adress)

Dinesh said...

Hi,
I am using hotmail extractor class,but i am getting the error "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" can any one solve thi??

Dinesh said...

Hi Ahmed,

Can you please send the code to my maillid:dineshd87@gmail.com.please.....

Anita said...

Hi Ahmed,

my email id is anita.s.1201@gmail.com

Can you send me the new code please?

thanks

Dinesh said...

Hi Anita,

If you get any new code,please forward to me...

Thanks...

J.P. said...

Hi Ahmed,

im Javier, can you send me the code to elchalten@hotmail.com??

Thanks a lot!

YoKeSe said...

Ahmed please can you send me windows live contacts please to yokese@gmail.com ?

Thanks for your help :-)

pd : Sorry for my poor english

YoKeSe said...

Hi! Please I need your help , if any person receive windows live contacts from ahmed please send me it to my email yokese@gmail.com , I need for my job ( if I dont obtain it I dont have job... :-( )

Thanks for your help and sorry for my poor english

shaik said...

Hi Ahmed,

I read your comments like
"really it's a good Dll but there was some errors in grabbing Hotmail Contact List . so, i had made some changes in its code and now it imports Hotmail Contact List succesfully :) :)"

pls send the code to my id, dawood_hasnudden@rediffmail.com
Thanks in Advance

Ahmed said...

hi all,
sorry for lateness. this link for the code , i uploaded it on rapidshare :

http://rapidshare.com/files/216292801/OpenContacts.NET.rar.html

i hope it can help you .

Johan Wikström said...

Ahmeds file dones not seem to fix:

The remote certificate is invalid according to the validation procedure.

Its Microsoft that need to update their certificate i think..

anyone know another way to get the hotmail contacts?

Matias Podrojsky said...

Ahmed please can you send me windows live contacts please to mattpodro@hotmail.com ?

Thanks for your help!!

(the http://rapidshare.com/files/216292801/OpenContacts.NET.rar.html has expired :S)

python 2007 said...

Hi ahmed can you send me hotmail code at jitendrapatil2006@gmail.com
please i really need it.

Juan said...
This comment has been removed by the author.
jai prakash said...

hi Ahmed ,
yahoo,gmail contact extractor are working fine , but live contact extractor give error- "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." on this line-"WebResponse response = request.GetResponse();"

isha said...

Hi Ahmed.

Please send me updated code of importing hotmail contacts on isha.esha@gmail.com

Johan Wikström said...

as i wrote before Ahmends version does not work anymore.. we need a version that uses hotmails openid solution.

Rahul Singh said...

Hi Ahmed,

Can anyone help me with the Live Contacts.

I tried using the Live SDK by scraping the delgated authentication, but it does not work.

Can anyone please comment if this code works. and please send me the latest code at rahulsinghpune@gmail.com

ashu said...

hi gnilly boy..


Your code version for opencontacts 1.0 works fine for Google and yahoo.Its excellent!..Hotmail too was working ..but for the while i get stuck with exception when calling the GetResponse() method .."The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."..But the token gets generated using TicketAcquirer.getTicket() method..

Please advice me on this..

Farhan said...

Salam Ahmed
Ur given link for code is een expired.
Plz either give new link or mail me at farhanghani88@hotmail.com
Thanx in advance bro...

Lalit Tankala said...

Hi, I also need the lastest code for OpenContact.NET or a utility for Gmail, Yahoo and Hotmail import.

OpenContact is giving issues with Hotmail.

Can someone please send me the code to ltankala@gmail.com?

Niral said...

i have tried it but hotmail does not work for me, google and yahoo works fine.
do you guys think point to entry to live web serivce is wrong.
please help me out here

kok wei. Yip said...

I tried to modify the code to import the hotmail contact list, but it's fail.

Do you guys have any solution on it.

Kindly help me out.. Please.

My email is k.w.yip04@gmail.com

ram said...

I too get stuck with exception when calling the GetResponse() method .."The underlying connection was closed".

Could you please send me the latest code at ramsjone@hotmail.com

Satinder said...

hi Gnilly, The code is not working for me except yahoo even that only once a day. Can u please send me the updated code. Thanks in advance

showkath said...

hi

opencontactsnet
fine with gmail and yahoo... but live didnt work at all..
plz assist me ..what will be error

abhishek said...

Hi i am abhishek

When I m trying to import contacts from hotmail address book, its giving me error 404.

Can you help me out with this?
My email id-microsoftabhi@gmail.com

abhishek said...

Hi i am abhishek

When I m trying to import contacts from hotmail address book, its giving error:-

"The remote name could not be resolved: 'cumulus.services.live.com"

Can you help me out with this?
My email id-microsoftabhi@gmail.com

abhishek said...

hi Ahmed ,
yahoo contact extractor are working fine , but live contact extractor give error- "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." on this line-"WebResponse response = request.GetResponse();"

Please send me updated code of importing hotmail contacts on microsoftabhi@gmail.com

Matias said...
This comment has been removed by the author.
Matias said...

I have the same problem, and I need the solution!!! could anybody or Amesh send me the code? Please???

Thanks! And good forum.


matiasburni@gmail.com

Milanfriend said...

i trying import contacts from yahoo address book, have some problem yahoo contacts can not getting.

please send me the code on milanjansair@gmail.com.

Does anyone can help me out.

Anita said...

Hey

contact importer of gmail is not working..

can someone send me updated code?

regards

Samineni said...

Hi,

Can any one send me the code for reading address book from gmail,yahoo and hotmail.....

plz help...........

asasa said...

人生是故事的創造與遺忘。 ..................................................

Joey said...

Hi Admad,

Could you send the source code.
My email address is joeyliew2009@gmail.com.

Thank you.

Regards,
Joey Liew

Joey said...

Hi Admad,

Could you send the source code.
My email address is joeyliew2009@gmail.com.

Thank you.

Regards,
Joey Liew

雪糕 said...

笑口常開~~天天開心........................................

簡單嗎 said...

blog is great~~祝你人氣高高~ ........................................

sohel said...

Hi Ahmed,

Could you send the source code for hotmail import.
My email address is sohel.shaikh.s@gmail.com

Thank you.

Regards,
Sohel

qusa said...

adult成人情色激情成人聊天網情色影片色情俱樂部性愛影片情趣淫水影音情色限制級照片live show女生自慰影片超屌成人情色留言板淫亂女自慰免費視訊辣妹巨乳鹹濕色情影音聊天自拍走光照片免費情色av圖片亞洲情色論壇淫慾免費裸女圖片裙底風光台灣色情論壇一夜正妹淫娃網情色下載a圖片全裸淫蕩女人情色影音聊天高潮自慰色情圖片成人自拍女生自慰亞洲成人色情dvd舔乳頭女生自慰影片台灣色情網站台灣性樂園sex story情色影音激情聊天室嘿咻情色自拍

mackt_gattis1115 said...

I do like ur article~!!!..................................................

韓建霖 said...

如此動感的blog!!!........................................

王俊貴 said...

樂觀進取,勇往直前,持之以恒,是克服困難的妙方。......................................................

劉WileyMares said...

^^ 謝謝你的分享,祝你生活永遠多彩多姿!........................................

Nilashini said...

hi all,

i am trying to import contacts from yahoo using this opencontacts.

in this, i got output for email address is "sans-serif;*font-size:small;*font:x-small;}" and Name is "clean" insteat of getting email address

Please tell anyone how to fix this error

Nilashini said...

when i import contacts from hotmail , i got the error "The remote name could not be resolved: 'cumulus.services.live.com' "

please tell anyone how to clear this error

ElvisS_Scholten0188 said...

ut聊天77p2p85cc85st85街視訊視訊聊天ava片a片下載成人情色色情影音視訊聊天洪爺影城洪爺免費視訊免費a片免費一對多utsogo論壇ut聊天室成人片免費看................

怡均 said...

天下沒有意把鑰匙,可以打開所有的門......................................................

馥虹 said...

分享的朋友,在精不在多,分享的幸福就在下一秒 ..................................................

AshleyRe凱倫 said...

真正的愛心,是照顧好自己的這顆心。 ..................................................

柏強 said...

成人分享 視訊, 未成年聊天 免費色情片觀賞 交友 日本av女優 性感美女 成人影片免費下載 偷拍成人貼圖站 6k聊天室 台灣愛愛片 情趣貼徒區 18免費線上 台灣美少女自拍a片免費 光碟影城 a片家庭教師姊姊h的偏差 情色五月天 日本色情短片 性感美女成人一夜情 免費影片下載383 完美女人影音 美女視訊 完美女人 辣妹成人網 人妻熟女bt 歐美熟女作愛 視訊做愛 空姐 a片a圖貼圖網 情色寫真集 85cc免費影城長片 18禁微風 成人嘟嘟往 www.777 皮卡丘貼圖 援交綱站 嘟嘟情人網  鋼管 av女憂 洪爺影音館 大奶av女優 gogosexy 遊戲下載 強姦 女性性高潮 後宮無碼情色網 限制級小說作者 0204成人影片欣賞 無碼性愛 林志玲走光

怡潔向霖 said...

聰明的人喜歡猜心 雖然每次都猜對了卻失去了自己的心..................................................

熙辰 said...

人有兩眼一舌,是為了觀察倍於說話的緣故。......................................................................

RochelleP_Higginson瓊文 said...

Every dog has his day. ....................................................

jackveronic said...

Wise men learn by other mens mistakes; fools by their own. ............................................................

明文吳 said...

看看blog調整心情,又要來繼續工作,大家加油......................................................................

蔡燕 said...

永遠支持你呀!!HO!!HO!!HO!!HO!!~~......................................................................

韋以 said...

要保持更新呦,加油!!!期待你的新文章!!!.................................................................                           

宛真宛真 said...

與人相處不妨多用眼睛說話,多用嘴巴思考.................................................................

群平群平 said...

成功多屬於那些很快做出決定,卻又不輕易變更的人。而失敗也經常屬於那些很難做出決定,卻又經常變更的人.................................................................

李娟張怡詹莉真 said...

認清問題就等於已經解決了一半的問題。.................................................................

玉婷良DGFHFJ瑋黃吳 said...

來拜訪你囉~期待你的下次文章~加油^^..................................................................

佳皓佳皓 said...

困難的不在於新概念,而在於逃避舊有的概念。............................................................

萬宇萬宇 said...

噴泉的高度,不會超過它的源頭。一個人的事業也是如此,它的成就絕不會超過自己的信念。..................................................................

天花天花 said...

Practice what you preach.............................................................

吳婷婷 said...

GOOD POST~~~~~~~~~~~~Support!!!!............................................................

文郭ss華賴ss添卉顏俊s任 said...

雖然不能常常來看,仍然祝你人氣百分百 ............................................................

趙喜柯凡豐妤 said...

河水永遠是相同的,可是每一剎那又都是新的。. . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

林聿希林聿希林聿希 said...

聰明人之所以不會成功,是因為他們缺乏了堅忍的毅力。..................................................

淑林林松 said...

Pay somebody back in his own coin. .......... . . . ............. .......... ..........

建邱勳 said...

逛BLOG逛上癮了,一天不來會不習慣了耶!!............................................................

建邱勳 said...

Some people cannot see the wood for the trees.............................................................

群育航學 said...

Subtlety is better than force. ......................................................................

建枫 said...

多謝美味的心靈雞湯......................................................

翊翊翊翊張瑜翊翊翊 said...

雖天地之大,萬物之多,而惟吾蜩翼之知。..................................................

Fenix said...

Does anybody fixed hotmail.com and live.com? and yahoo also error, It isn't return email. Please let me know if your solution is working.
Looking forward to your help.


Regards
Ernesto de' sandra

Fenix said...

I still get this error in hotmail class
Exception : "The remote name could not be resolved: 'cumulus.services.live.com'"

Please help.

Madhu said...

Dam Bull Shit Codes !!! nothing works

Ram said...

Now this code is not working at all.
Can somebody help me if there is any other way to import contact from yahoo, hotmail, AOL.

I am able to do import contact from gmail but not for other provider.


Ramveer Singh
ramveersingh@gmail.com

kinjal said...

i tried this code but not abel to get contact it will give me erro like this below :

The remote server returned an error: (401) Unauthorized.

vijay vishwakarma said...

Anyone got this fixed ?

tota said...

I need to import hotmail contacts. can help and send me the code.
ebtsam.138@hotmail.com

tota said...

I need to import hotmail contacts. can help and send me the code.
ebtsam.138@hotmail.com

Naviya Nair said...

I have read your blog its very attractive and impressive. I like it your blog.

.Net Training in Chennai | .Net Online Training

Dot Net Online Training | LINQ Online Training ASP.NET Online Training