Click here to Skip to main content
15,896,428 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to generate the dynamic menu in front end.(sequence and page hiearachy pass by the adminstrator) Pin
keyur satyadev19-Feb-09 21:57
keyur satyadev19-Feb-09 21:57 
QuestionValidation of viewstate MAC failed Pin
NidhiKanu19-Feb-09 21:34
professionalNidhiKanu19-Feb-09 21:34 
AnswerRe: Validation of viewstate MAC failed Pin
Pratik Vasant Shah20-Feb-09 1:31
Pratik Vasant Shah20-Feb-09 1:31 
GeneralRe: Validation of viewstate MAC failed Pin
NidhiKanu20-Feb-09 1:50
professionalNidhiKanu20-Feb-09 1:50 
QuestionComma Separated Value Pin
krishna2gubbala19-Feb-09 21:32
krishna2gubbala19-Feb-09 21:32 
AnswerRe: Comma Separated Value Pin
Christian Graus19-Feb-09 21:59
protectorChristian Graus19-Feb-09 21:59 
AnswerRe: Comma Separated Value Pin
J4amieC19-Feb-09 22:10
J4amieC19-Feb-09 22:10 
Questionhotmail address book import. Pin
VijayVishwakarma19-Feb-09 20:56
VijayVishwakarma19-Feb-09 20:56 
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( 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
}

Vijay V.

Yash Softech

QuestionHow to Get Short date in Proper Format? Pin
mr_muskurahat19-Feb-09 20:28
mr_muskurahat19-Feb-09 20:28 
AnswerRe: How to Get Short date in Proper Format? Pin
Gaurav K Singh19-Feb-09 20:38
Gaurav K Singh19-Feb-09 20:38 
GeneralRe: How to Get Short date in Proper Format? Pin
mr_muskurahat19-Feb-09 23:01
mr_muskurahat19-Feb-09 23:01 
AnswerRe: How to Get Short date in Proper Format? Pin
Xmen Real 20-Feb-09 17:56
professional Xmen Real 20-Feb-09 17:56 
Questionon line web application Pin
kulandaivel_mca200719-Feb-09 19:19
kulandaivel_mca200719-Feb-09 19:19 
AnswerRe: on line web application Pin
Gaurav K Singh19-Feb-09 19:56
Gaurav K Singh19-Feb-09 19:56 
GeneralRe: on line web application Pin
kulandaivel_mca200719-Feb-09 19:59
kulandaivel_mca200719-Feb-09 19:59 
GeneralRe: on line web application Pin
rakeshs31219-Feb-09 20:04
rakeshs31219-Feb-09 20:04 
GeneralRe: on line web application Pin
kulandaivel_mca200719-Feb-09 20:18
kulandaivel_mca200719-Feb-09 20:18 
QuestionRead the line separation from the word document... Pin
RajpootRohan19-Feb-09 17:53
professionalRajpootRohan19-Feb-09 17:53 
Questionto load a method, whats the diffrence between to call pageload and the apsx page itself..., Pin
Member 387988119-Feb-09 17:50
Member 387988119-Feb-09 17:50 
AnswerRe: to load a method, whats the diffrence between to call pageload and the apsx page itself..., Pin
Gaurav K Singh19-Feb-09 20:49
Gaurav K Singh19-Feb-09 20:49 
QuestionHow to embed Flash Player in asp.net web page Pin
sourabhgarg19-Feb-09 17:38
sourabhgarg19-Feb-09 17:38 
AnswerRe: How to embed Flash Player in asp.net web page Pin
lobbychmd19-Feb-09 19:34
lobbychmd19-Feb-09 19:34 
Questionhow to retrieve data Pin
JAYRAJ GIRI19-Feb-09 16:42
JAYRAJ GIRI19-Feb-09 16:42 
AnswerRe: how to retrieve data Pin
thomas_joyee19-Feb-09 17:32
thomas_joyee19-Feb-09 17:32 
AnswerRe: how to retrieve data Pin
rakeshs31219-Feb-09 19:28
rakeshs31219-Feb-09 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.