Click here to Skip to main content
15,921,989 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to populate grid view with list of files. [modified] Pin
rakeshs31219-Feb-09 23:37
rakeshs31219-Feb-09 23:37 
AnswerRe: how to populate grid view with list of files. Pin
Member 43782053-Mar-09 7:07
Member 43782053-Mar-09 7:07 
QuestionHow To Store File Path In Access Databse in ASP.net using C# Pin
aashish.saalvi19-Feb-09 22:23
aashish.saalvi19-Feb-09 22:23 
AnswerRe: How To Store File Path In Access Databse in ASP.net using C# Pin
Vimalsoft(Pty) Ltd19-Feb-09 22:34
professionalVimalsoft(Pty) Ltd19-Feb-09 22:34 
AnswerRe: How To Store File Path In Access Databse in ASP.net using C# Pin
farogh haider19-Feb-09 23:13
farogh haider19-Feb-09 23:13 
AnswerRe: How To Store File Path In Access Databse in ASP.net using C# [modified] Pin
rakeshs31219-Feb-09 23:40
rakeshs31219-Feb-09 23:40 
QuestionDoes dll developed using Framework 3.5 will work in Framework 2.0 server Pin
Exelioindia19-Feb-09 22:10
Exelioindia19-Feb-09 22:10 
AnswerRe: Does dll developed using Framework 3.5 will work in Framework 2.0 server Pin
Christian Graus19-Feb-09 22:17
protectorChristian Graus19-Feb-09 22:17 
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 

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.