Aol is not working for me

12 views
Skip to first unread message

Aamer Malik

unread,
Oct 14, 2008, 2:57:28 AM10/14/08
to ContactsReader
Aol is not working for me please help me anyone

Joemon Mani

unread,
Oct 16, 2008, 1:04:58 AM10/16/08
to contact...@googlegroups.com
It Will Work

You Do This Way

Check You Code Wether Contacts are importing

For Aol In ContactsReader The contacts are importing but collecting it to the data set is not correct .So u neet to change a bit of code
Message has been deleted
Message has been deleted
Message has been deleted

ram

unread,
Oct 24, 2008, 8:41:28 AM10/24/08
to ContactsReader
I did a small modification to this. check it out.

/*
* Contacts Reader
* Version: Beta 1.0
* Released: 10 Dec, 2007
* Core Developer:Vasanthakumar(DrunkenP...@gmail.com)
* Credits: Jegatheeswaran(JScrip...@gmail.com), Syed Vaisul
Karne(SqlL...@gmail.com)
* Copyright (C) 2007
* more info: http://www.ideabubbling.com
*/
using System;
using System.Collections;
using System.Data;
using System.IO;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

namespace ideaBubbling.ContactsReader
{
public class AOLmail1 : Imail
{
public static bool MyCertValidation(object sender,
X509Certificate certificate, X509Chain chain, SslPolicyErrors
sslPolicyErrors)
{
return true;
}

public void GetContacts(string strUserid, string strPassword,
out bool boolIsOK, out DataTable dtContatct, out string strError)
{
//default values
dtContatct = new DataTable();
boolIsOK = true;
strError = string.Empty;

//WebProxy wp = new WebProxy("localhost", 8888);
//ServicePointManager.ServerCertificateValidationCallback
= new RemoteCertificateValidationCallback(MyCertValidation);
//
1====================================================================================================
//http://webmail.aol.com/
string strRequestUrl = "http://webmail.aol.com";
HttpWebRequest reqFirstPage =
(HttpWebRequest)WebRequest.Create(strRequestUrl);
reqFirstPage.Method = Utility.Get;
reqFirstPage.KeepAlive = true;
reqFirstPage.AllowAutoRedirect = false;
reqFirstPage.UseDefaultCredentials = true;
reqFirstPage.CookieContainer = new CookieContainer();
reqFirstPage.UserAgent = Utility.UserAgent;
//reqFirstPage.Proxy = wp;
HttpWebResponse resFirstPage =
(HttpWebResponse)reqFirstPage.GetResponse();
//HttpWebResponse resFirstPage =
(HttpWebResponse)reqFirstPage.Headers.GetResponse();
CookieCollection ccFirstPage = new CookieCollection();
if (resFirstPage.Headers[Utility.SetCookie] != null)
{

ccFirstPage.Add(Utility.GetAllCookiesFromHeader(resFirstPage.Headers[Utility.SetCookie],
resFirstPage.ResponseUri.Host));
}
StreamReader sr1 = new
StreamReader(resFirstPage.GetResponseStream());
String strFirstPage = sr1.ReadToEnd();
sr1.Close();
//string strLoginPageUrlTemp =
resFirstPage.ResponseUri.ToString();
resFirstPage.Close();
reqFirstPage.Abort();
//string strGetLoginPageUrlTemp =
Utility.GetRegExParsedValue("\\(\"(?<RetVal>https:.*?)\"\\)",
strFirstPage);
//if (strGetLoginPageUrlTemp == string.Empty)
//{
// boolIsOK = false;
// strError = Utility.ApplicationError;
// return;
//}
//
2==================================================================================================
//http://webmail.aol.com/ redirect to subsequent
requests....
//http://webmail.aol.com/_cqr/PortalCookieCheck.aspx?
site=sns.webmail.aol.com&siteState=ver%3a2%7cac%3aWS%7cat%3aSNS%7cld
%3awebmail.aol.com%7cuv%3aAOL%7clc%3aen-us
//http://my.screenname.aol.com/_cqr/login/login.psp?
sitedomain=sns.webmail.aol.com&lang=en&locale=us&authLev=2&siteState=ver
%3a2%7cac%3aWS%7cat%3aSNS%7cld%3awebmail.aol.com%7cuv%3aAOL%7clc%3aen-
us&seamless=novl
//https://my.screenname.aol.com/_cqr/login/login.psp?
sitedomain=sns.webmail.aol.com&lang=en&locale=us&authLev=2&siteState=ver
%3a2%7cac%3aWS%7cat%3aSNS%7cld%3awebmail.aol.com%7cuv%3aAOL%7clc%3aen-
us&seamless=novl
string strGetLoginPageUrl = strRequestUrl;
HttpWebRequest reqGetLoginPage =
(HttpWebRequest)WebRequest.Create(strGetLoginPageUrl);
reqGetLoginPage.Method = Utility.Get;
reqGetLoginPage.KeepAlive = true;
reqGetLoginPage.AllowAutoRedirect = true;
reqGetLoginPage.UseDefaultCredentials = true;
reqGetLoginPage.CookieContainer = new CookieContainer();
reqGetLoginPage.CookieContainer.Add(ccFirstPage);
reqGetLoginPage.UserAgent = Utility.UserAgent;
//reqGetLoginPage.Proxy = wp;
HttpWebResponse resGetLoginPage =
(HttpWebResponse)reqGetLoginPage.GetResponse();
CookieCollection ccGetLoginPage = new CookieCollection();
if (resGetLoginPage.Headers[Utility.SetCookie] != null)
{

ccGetLoginPage.Add(Utility.GetAllCookiesFromHeader(resGetLoginPage.Headers[Utility.SetCookie],
resGetLoginPage.ResponseUri.Host));
}
StreamReader sr2 = new
StreamReader(resGetLoginPage.GetResponseStream());
String strGetLoginPage = sr2.ReadToEnd();
sr2.Close();
resGetLoginPage.Close();
reqGetLoginPage.Abort();

string strLoginUrlTemp = Utility.GetRegExParsedValue("<form
\\s*name=\"AOLLoginForm\".*?action=\"(?<RetVal>.*?)\".*?>",
strGetLoginPage);
string strFormValue =
Utility.GetInputControlsNameAndValueInPage(strGetLoginPage);
if (strFormValue.IndexOf("loginId=") >= 0)
{
strFormValue = strFormValue.Replace("loginId=",
"loginId=" + strUserid);
}
else
{
boolIsOK = false;
strError = Utility.ApplicationError;
return;
}
if (strFormValue.IndexOf("password=") >= 0)
{
strFormValue = strFormValue.Replace("password=",
"password=" + strPassword);
}
else
{
boolIsOK = false;
strError = Utility.ApplicationError;
return;
}
//
3================================================================================
//https://my.screenname.aol.com/_cqr/login/login.psp?
mcState=initialized&seamless=novl&sitedomain=sns.webmail.aol.com&lang=en&locale=us&authLev=2&siteState=ver
%3a2%7cac%3aWS%7cat%3aSNS%7cld%3awebmail.aol.com%7cuv%3aAOL%7clc%3aen-
us
string strLoginUrl = strLoginUrlTemp;
string strLoginUrlPost = strFormValue;
HttpWebRequest reqLogin =
(HttpWebRequest)WebRequest.Create(strLoginUrl);
reqLogin.KeepAlive = true;
reqLogin.Method = Utility.Post;
reqLogin.AllowAutoRedirect = false;
reqLogin.UseDefaultCredentials = true;
reqLogin.Referer = strGetLoginPageUrl;
reqLogin.UserAgent = Utility.UserAgent;
reqLogin.ContentType = Utility.ContentTypeUrlEncoded;
reqLogin.CookieContainer = new CookieContainer();
reqLogin.CookieContainer.Add(ccGetLoginPage);
reqLogin.ContentLength = strLoginUrlPost.Length;
//reqLogin.Proxy = wp;
StreamWriter sw3 = new
StreamWriter(reqLogin.GetRequestStream());
sw3.Write(strLoginUrlPost);
sw3.Close();

HttpWebResponse resLogin =
(HttpWebResponse)reqLogin.GetResponse();
resLogin.Cookies =
reqLogin.CookieContainer.GetCookies(reqLogin.RequestUri);
StreamReader sr3 = new
StreamReader(resLogin.GetResponseStream());
String strAftLoginPage = sr3.ReadToEnd();
sr3.Close();
CookieCollection ccLogin = new CookieCollection();
ccLogin = resLogin.Cookies;
resLogin.Close();
reqLogin.Abort();

string strLoginSucUrlTemp =
Utility.GetRegExParsedValue("<body.*?'(?<RetVal>http:.*?)'.*?>",
strAftLoginPage);
if (strLoginSucUrlTemp == string.Empty)
{
boolIsOK = false;
strError = Utility.UseridPassWrong;
return;
}
//
4=======================================================================================
//http://webmail.aol.com/_cqr/LoginSuccess.aspx?
sitedomain=sns.webmail.aol.com&authLev=2&siteState=ver%3A2%7Cac%3AWS
%7Cat%3ASNS%7Cld%3Awebmail.aol.com%7Cuv%3AAOL%7Clc%3Aen-
us&lang=en&locale=us&uitype=std&mcAuth=%2FBcAG0c9l%2B0AAK9GAL
%2FgZkc9mCkI5E%2F7ZsSbKrkAAA%3D%3D

string strLoginSucPageUrl = strLoginSucUrlTemp;
HttpWebRequest reqLoginSucPage =
(HttpWebRequest)WebRequest.Create(strLoginSucPageUrl);
reqLoginSucPage.Method = Utility.Get;
reqLoginSucPage.KeepAlive = true;
reqLoginSucPage.AllowAutoRedirect = false;
reqLoginSucPage.UseDefaultCredentials = true;
reqLoginSucPage.CookieContainer = new CookieContainer();
reqLoginSucPage.CookieContainer.Add(ccLogin);
reqLoginSucPage.UserAgent = Utility.UserAgent;
//reqLoginSucPage.Proxy = wp;
HttpWebResponse resLoginSucPage =
(HttpWebResponse)reqLoginSucPage.GetResponse();
CookieCollection ccLoginSucPage = new CookieCollection();
if (resGetLoginPage.Headers[Utility.SetCookie] != null)
{

ccLoginSucPage.Add(Utility.GetAllCookiesFromHeader(resLoginSucPage.Headers[Utility.SetCookie],
resLoginSucPage.ResponseUri.Host));
}
StreamReader sr4 = new
StreamReader(resLoginSucPage.GetResponseStream());
String strLoginSucPage = sr4.ReadToEnd();
sr4.Close();
resLoginSucPage.Close();
reqGetLoginPage.Abort();
string strTemp4 = ((Cookie)
(ccLoginSucPage["Auth"])).Value;
string strUserDyn = string.Empty;
if (strTemp4.IndexOf("uid:") >= 0)
{
int uidLoc = strTemp4.IndexOf("uid:");
int uidEndLoc = strTemp4.IndexOf("&", uidLoc);
strUserDyn = strTemp4.Substring(uidLoc + 4, uidEndLoc
- (uidLoc + 4));
}
string strJSONUrlDynamicNumber =
Utility.GetRegExParsedValue("http://webmail.aol.com/(?<RetVal>.*?)/
aol/", strLoginSucPage);
if (strJSONUrlDynamicNumber == string.Empty)
{
boolIsOK = false;
strError = Utility.ApplicationError;
return;
}
//
5==========================================================================================
//http://webmail.aol.com/31361/aol/en-us/common/rpc/
RPC.aspx?user=zhZ9dx0-PD&r=0.337314476495153&a=AutoCompleteContacts-
GetScreenNames
string strDesiredCookieDomain = ".aol.com";
Cookie cookVersion = new Cookie("Version",
strJSONUrlDynamicNumber + ":webmail.aol.com", "/",
strDesiredCookieDomain);
Cookie cookRELOAD = new Cookie("RELOAD", "false", "/",
strDesiredCookieDomain);
Cookie cooks_cc = new Cookie("s_cc", "true", "/",
strDesiredCookieDomain);
Cookie cooks_sq = new Cookie("s_sq", "aolsnssignin%2Caolsvc
%3D%2526pid%253Dsso%252520%25253A%252520login%2526pidt%253D1%2526oid
%253DSign%252520In%2526oidt%253D3%2526ot%253DSUBMIT%2526oi%253D129",
"/", strDesiredCookieDomain);
CookieCollection ccTemo2 = new CookieCollection();
ccTemo2.Add(cookVersion);
ccTemo2.Add(cookRELOAD);
ccTemo2.Add(cooks_cc);
ccTemo2.Add(cooks_sq);
CookieCollection ccRevolution = new CookieCollection();
ccRevolution.Add(Utility.GetDomainCorrectedCC(ccTemo2,
strDesiredCookieDomain));
ccRevolution.Add(Utility.GetDomainCorrectedCC(ccLogin,
strDesiredCookieDomain));

ccRevolution.Add(Utility.GetDomainCorrectedCC(ccLoginSucPage,
strDesiredCookieDomain));
//-----------
string strJSONUrl = "http://webmail.aol.com/" +
strJSONUrlDynamicNumber + "/aol/en-us/common/rpc/RPC.aspx?user=" +
strUserDyn + "&r=" + Utility.GetJavascriptRandomValue() +
"&a=AutoCompleteContacts-GetScreenNames";
string strJSONUrlPost =
"dojo.transport=xmlhttp&automatic=false&requests=[{\"hash\":\"\",
\"action\":\"AutoCompleteContacts\"},{\"updateMsgCounts\":true,\"action
\":\"GetScreenNames\"}]";
HttpWebRequest reqJSON =
(HttpWebRequest)WebRequest.Create(strJSONUrl);
reqJSON.KeepAlive = true;
reqJSON.Method = Utility.Post;
reqJSON.AllowAutoRedirect = false;
reqJSON.Accept = Utility.AcceptAll;
reqJSON.UseDefaultCredentials = true;
reqJSON.Referer = "http://webmail.aol.com/" +
strJSONUrlDynamicNumber + "/aol/en-us/Suite.aspx";
reqJSON.UserAgent = Utility.UserAgent;
reqJSON.ContentType = Utility.ContentTypeUrlEncoded;
reqJSON.CookieContainer = new CookieContainer();
//reqJSON.Proxy = wp;
reqJSON.CookieContainer.Add(ccRevolution);
reqJSON.ContentLength = strJSONUrlPost.Length;
StreamWriter sw5 = new
StreamWriter(reqJSON.GetRequestStream());
sw5.Write(strJSONUrlPost);
sw5.Close();
HttpWebResponse resJSON =
(HttpWebResponse)reqJSON.GetResponse();
resJSON.Cookies =
reqJSON.CookieContainer.GetCookies(reqJSON.RequestUri);
StreamReader sr5 = new
StreamReader(resJSON.GetResponseStream());
String strJSONPage = sr5.ReadToEnd();
sr5.Close();
CookieCollection ccJSON = new CookieCollection();
ccJSON = resLogin.Cookies;
resJSON.Close();
reqJSON.Abort();
//
=============================================================================
//String strJSONPage = File.ReadAllText("C://json.txt");
string strJSONContacts =
Utility.GetRegExParsedValue("listString\":(?<RetVal>.*?)}",
strJSONPage);
if (strJSONContacts == string.Empty)
{
boolIsOK = false;
strError = Utility.ApplicationError;
return;
}

//char c = '\u0002';
//string strRemoveCode = c.ToString();
//string strReadyToSplitJSON =
strJSONContacts.Replace(strRemoveCode, string.Empty);
//ArrayList alFirstName =
Utility.GetRegExMatchCollectionRetVal("\u0010(?<RetVal>.*?)\u0011",
strReadyToSplitJSON);
//ArrayList alLastName =
Utility.GetRegExMatchCollectionRetVal("\u0011(?<RetVal>.*?)\u0013",
strReadyToSplitJSON);
//ArrayList alScreenName =
Utility.GetRegExMatchCollectionRetVal("\u0013(?<RetVal>.*?)\u0014",
strReadyToSplitJSON);
//ArrayList alEmail =
Utility.GetRegExMatchCollectionRetVal("\u0014(?<RetVal>.*?)\u0016",
strReadyToSplitJSON);
//ArrayList alPhone =
Utility.GetRegExMatchCollectionRetVal("\u0016(?<RetVal>.*?)\u001b",
strReadyToSplitJSON);

//Code Improvement by Manoj Pillai(manu...@gmail.com) on
24/01/2007
string c;
string strRemoveCode;
string strReadyToSplitJSON;

c = "\\u0002";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strJSONContacts.Replace(strRemoveCode, "###");

c = "\\u0010";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyFName#");

c = "\u0011";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyLName#");

c = "\\u0013";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyScreenName#");

c = "\\u0014";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyEmail#");

c = "\\u0016";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyPhone#");

c = "\\u001b";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyWorkPhone#");

c = "\\u0018";
strRemoveCode = c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyCellular#");

c = "\\u0001";
strRemoveCode = "5" + c.ToString();
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyStart#");

strRemoveCode = " #";
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, "#MyEnd#");

c = "\\u0015";
strRemoveCode = c;
strReadyToSplitJSON =
strReadyToSplitJSON.Replace(strRemoveCode, ",");

ArrayList alFirstName =
Utility.GetRegExMatchCollectionRetVal("#MyFName####(?
<RetVal>.*?)####", strReadyToSplitJSON);
ArrayList alLastName =
Utility.GetRegExMatchCollectionRetVal("#MyLName####(?
<RetVal>.*?)####", strReadyToSplitJSON);
ArrayList alScreenName =
Utility.GetRegExMatchCollectionRetVal("#MyScreenName####(?
<RetVal>.*?)####", strReadyToSplitJSON);
ArrayList alEmail =
Utility.GetRegExMatchCollectionRetVal("#MyEmail####(?
<RetVal>.*?)####", strReadyToSplitJSON);
ArrayList alPhone =
Utility.GetRegExMatchCollectionRetVal("#MyPhone####(?
<RetVal>.*?)####", strReadyToSplitJSON);

dtContatct.Columns.Add("FirstName");
dtContatct.Columns.Add("LastName");
dtContatct.Columns.Add("ScreenName");
dtContatct.Columns.Add("Email");
dtContatct.Columns.Add("Phone");

DataRow dr;
int nRowsCount = alFirstName.Count;
if (nRowsCount == 0)
{
boolIsOK = false;
strError = Utility.ApplicationError;
return;
}

//if count is zero then then fill with empty string
if (alFirstName.Count == 0)
{
for (int i = 0; i < nRowsCount; i++)
{

alFirstName.Add(string.Empty);
}
}
if (alLastName.Count == 0)
{
for (int i = 0; i < nRowsCount; i++)
{

alLastName.Add(string.Empty);
}
}
if (alScreenName.Count == 0)
{
for (int i = 0; i < nRowsCount; i++)
{

alScreenName.Add(string.Empty);
}
}
if (alEmail.Count == 0)
{
for (int i = 0; i < nRowsCount; i++)
{
alEmail.Add(string.Empty);
}
}
if (alPhone.Count == 0)
{
for (int i = 0; i < nRowsCount; i++)
{
alPhone.Add(string.Empty);
}
}


//convert it into dataset
for (int i = 0; i < nRowsCount; i++)
{
dr = dtContatct.NewRow();
dr[0] =
alFirstName[i].ToString().Replace("#","").Replace("\\u0011", " ");
dr[1] = alLastName[i].ToString();
dr[2] = alScreenName[i].ToString();
dr[3] = alEmail[i].ToString();
dr[4] = alPhone[i].ToString();
dtContatct.Rows.Add(dr);

Anuj singhal

unread,
Oct 24, 2008, 11:48:36 PM10/24/08
to contact...@googlegroups.com
Thanks due!
cheers

 

babyking

unread,
Nov 6, 2008, 1:54:19 AM11/6/08
to ContactsReader
Hi,i have the same problem,but i can't find where need to modified:(
Could you upload the AOLMail.cs to File in this Group?
THX!


On 10月24日, 下午8时41分, ram <ramireddydasara...@gmail.com> wrote:
> I did a small modification to this. check it out.
>
> /*
> * Contacts Reader
> * Version: Beta 1.0
> * Released: 10 Dec, 2007
> * Core Developer:Vasanthakumar(DrunkenProgram...@gmail.com)
> * Credits: Jegatheeswaran(JScriptLo...@gmail.com), Syed Vaisul
> Karne(SqlLo...@gmail.com)
> 1==========================================================================-==========================
> //http://webmail.aol.com/
> string strRequestUrl = "http://webmail.aol.com";
> HttpWebRequest reqFirstPage =
> (HttpWebRequest)WebRequest.Create(strRequestUrl);
> reqFirstPage.Method = Utility.Get;
> reqFirstPage.KeepAlive = true;
> reqFirstPage.AllowAutoRedirect = false;
> reqFirstPage.UseDefaultCredentials = true;
> reqFirstPage.CookieContainer = new CookieContainer();
> reqFirstPage.UserAgent = Utility.UserAgent;
> //reqFirstPage.Proxy = wp;
> HttpWebResponse resFirstPage =
> (HttpWebResponse)reqFirstPage.GetResponse();
> //HttpWebResponse resFirstPage =
> (HttpWebResponse)reqFirstPage.Headers.GetResponse();
> CookieCollection ccFirstPage = new CookieCollection();
> if (resFirstPage.Headers[Utility.SetCookie] != null)
> {
>
> ccFirstPage.Add(Utility.GetAllCookiesFromHeader(resFirstPage.Headers[Utilit-y.SetCookie],
> resFirstPage.ResponseUri.Host));
> }
> StreamReader sr1 = new
> StreamReader(resFirstPage.GetResponseStream());
> String strFirstPage = sr1.ReadToEnd();
> sr1.Close();
> //string strLoginPageUrlTemp =
> resFirstPage.ResponseUri.ToString();
> resFirstPage.Close();
> reqFirstPage.Abort();
> //string strGetLoginPageUrlTemp =
> Utility.GetRegExParsedValue("\\(\"(?<RetVal>https:.*?)\"\\)",
> strFirstPage);
> //if (strGetLoginPageUrlTemp == string.Empty)
> //{
> // boolIsOK = false;
> // strError = Utility.ApplicationError;
> // return;
> //}
> //
> 2==========================================================================-========================
> //http://webmail.aol.com/redirect to subsequent
> ccGetLoginPage.Add(Utility.GetAllCookiesFromHeader(resGetLoginPage.Headers[-Utility.SetCookie],
> 3==========================================================================-======
> //https://my.screenname.aol.com/_cqr/login/login.psp?
> mcState=initialized&seamless=novl&sitedomain=sns.webmail.aol.com&lang=en&lo-cale=us&authLev=2&siteState=ver
> 4==========================================================================-=============
> //http://webmail.aol.com/_cqr/LoginSuccess.aspx?
> sitedomain=sns.webmail.aol.com&authLev=2&siteState=ver%3A2%7Cac%3AWS
> %7Cat%3ASNS%7Cld%3Awebmail.aol.com%7Cuv%3AAOL%7Clc%3Aen-
> us&lang=en&locale=us&uitype=std&mcAuth=%2FBcAG0c9l%2B0AAK9GAL
> %2FgZkc9mCkI5E%2F7ZsSbKrkAAA%3D%3D
>
> string strLoginSucPageUrl = strLoginSucUrlTemp;
> HttpWebRequest reqLoginSucPage =
> (HttpWebRequest)WebRequest.Create(strLoginSucPageUrl);
> reqLoginSucPage.Method = Utility.Get;
> reqLoginSucPage.KeepAlive = true;
> reqLoginSucPage.AllowAutoRedirect = false;
> reqLoginSucPage.UseDefaultCredentials = true;
> reqLoginSucPage.CookieContainer = new CookieContainer();
> reqLoginSucPage.CookieContainer.Add(ccLogin);
> reqLoginSucPage.UserAgent = Utility.UserAgent;
> //reqLoginSucPage.Proxy = wp;
> HttpWebResponse resLoginSucPage =
> (HttpWebResponse)reqLoginSucPage.GetResponse();
> CookieCollection ccLoginSucPage = new CookieCollection();
> if (resGetLoginPage.Headers[Utility.SetCookie] != null)
> {
>
> ccLoginSucPage.Add(Utility.GetAllCookiesFromHeader(resLoginSucPage.Headers[-Utility.SetCookie],
> resLoginSucPage.ResponseUri.Host));
> }
> StreamReader sr4 = new
> StreamReader(resLoginSucPage.GetResponseStream());
> String strLoginSucPage = sr4.ReadToEnd();
> sr4.Close();
> resLoginSucPage.Close();
> reqGetLoginPage.Abort();
> string strTemp4 = ((Cookie)
> (ccLoginSucPage["Auth"])).Value;
> string strUserDyn = string.Empty;
> ...
>
> 阅读更多 >>

ram

unread,
Nov 6, 2008, 3:25:15 AM11/6/08
to ContactsReader
in my above post, i kept all the update code. that's enough. copy my
above post code.
in that code, rename the class AOLMail1 to AOLMail.
> > 1==========================================================================--==========================
> > //http://webmail.aol.com/
> > string strRequestUrl = "http://webmail.aol.com";
> > HttpWebRequest reqFirstPage =
> > (HttpWebRequest)WebRequest.Create(strRequestUrl);
> > reqFirstPage.Method = Utility.Get;
> > reqFirstPage.KeepAlive = true;
> > reqFirstPage.AllowAutoRedirect = false;
> > reqFirstPage.UseDefaultCredentials = true;
> > reqFirstPage.CookieContainer = new CookieContainer();
> > reqFirstPage.UserAgent = Utility.UserAgent;
> > //reqFirstPage.Proxy = wp;
> > HttpWebResponse resFirstPage =
> > (HttpWebResponse)reqFirstPage.GetResponse();
> > //HttpWebResponse resFirstPage =
> > (HttpWebResponse)reqFirstPage.Headers.GetResponse();
> > CookieCollection ccFirstPage = new CookieCollection();
> > if (resFirstPage.Headers[Utility.SetCookie] != null)
> > {
>
> > ccFirstPage.Add(Utility.GetAllCookiesFromHeader(resFirstPage.Headers[Utilit--y.SetCookie],
> > resFirstPage.ResponseUri.Host));
> > }
> > StreamReader sr1 = new
> > StreamReader(resFirstPage.GetResponseStream());
> > String strFirstPage = sr1.ReadToEnd();
> > sr1.Close();
> > //string strLoginPageUrlTemp =
> > resFirstPage.ResponseUri.ToString();
> > resFirstPage.Close();
> > reqFirstPage.Abort();
> > //string strGetLoginPageUrlTemp =
> > Utility.GetRegExParsedValue("\\(\"(?<RetVal>https:.*?)\"\\)",
> > strFirstPage);
> > //if (strGetLoginPageUrlTemp == string.Empty)
> > //{
> > // boolIsOK = false;
> > // strError = Utility.ApplicationError;
> > // return;
> > //}
> > //
> > 2==========================================================================--========================
> > //http://webmail.aol.com/redirectto subsequent
> > ccGetLoginPage.Add(Utility.GetAllCookiesFromHeader(resGetLoginPage.Headers[--Utility.SetCookie],
> > 3==========================================================================--======
> > //https://my.screenname.aol.com/_cqr/login/login.psp?
> > mcState=initialized&seamless=novl&sitedomain=sns.webmail.aol.com&lang=en&lo--cale=us&authLev=2&siteState=ver
> > 4==========================================================================--=============
> > //http://webmail.aol.com/_cqr/LoginSuccess.aspx?
> > sitedomain=sns.webmail.aol.com&authLev=2&siteState=ver%3A2%7Cac%3AWS
> > %7Cat%3ASNS%7Cld%3Awebmail.aol.com%7Cuv%3AAOL%7Clc%3Aen-
> > us&lang=en&locale=us&uitype=std&mcAuth=%2FBcAG0c9l%2B0AAK9GAL
> > %2FgZkc9mCkI5E%2F7ZsSbKrkAAA%3D%3D
>
> > string strLoginSucPageUrl = strLoginSucUrlTemp;
> > HttpWebRequest reqLoginSucPage =
> > (HttpWebRequest)WebRequest.Create(strLoginSucPageUrl);
> > reqLoginSucPage.Method = Utility.Get;
> > reqLoginSucPage.KeepAlive = true;
> > reqLoginSucPage.AllowAutoRedirect = false;
> > reqLoginSucPage.UseDefaultCredentials = true;
> > reqLoginSucPage.CookieContainer = new CookieContainer();
> > reqLoginSucPage.CookieContainer.Add(ccLogin);
> > reqLoginSucPage.UserAgent = Utility.UserAgent;
> > //reqLoginSucPage.Proxy = wp;
> > HttpWebResponse resLoginSucPage =
> > (HttpWebResponse)reqLoginSucPage.GetResponse();
>
> ...
>
> read more >>- Hide quoted text -
>
> - Show quoted text -

babyking1949

unread,
Nov 7, 2008, 1:41:52 AM11/7/08
to contact...@googlegroups.com
Thank you
the problem was resolved.
I just replace "aol" in url to "aim"
 
thx again!
 

babyking1949
2008-11-07

发件人: ram
发送时间: 2008-11-06 20:23:32
收件人: ContactsReader
抄送:
主题: Re: Aol is not working for me
Reply all
Reply to author
Forward
0 new messages