Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. hotmail address book import.

hotmail address book import.

Scheduled Pinned Locked Moved ASP.NET
helpcomsecurityjsonquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VijayVishwakarma
    wrote on last edited by
    #1

    Hi, I m trying to retrieve address book of hotmail using the api. I m getting error 404. Can any one help me out with this? here is my class file 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 = "hotmail.com"; //urib.Host = "login.live.com/login.srf?wa=wsignin1.0&rpsnv=10&ct=1235053953&rver=5.5.4177.0&wp=MBI&wreply=http://mail.live.com/default.aspx&lc=1033&id=64855&mkt=en-US"; urib.Port = 443; HttpWebRequest request = ( HttpWebRequest ) WebRequest.Create( urib.Uri ); string authHeader = string.Format( "WLID1.0 t=\"{0}\"", ticket ); request.Headers.Add( "Authorization", authHeader ); 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( mailCo

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups