Irfan Ahmed

Irfan Ahmed

  • NA
  • 1
  • 0

WebRequest redirection to final webpage.txt

Aug 29 2005 6:12 AM

Hi,

I am using the HttpWebRequest object to grab the hotmail login page. I have URL: http://login.passport.com/logout.srf?lc=1033&sf=1&id=2&tw=20&fs=1&cb=&cbid=24325&ts=0&sec=&mspp_shared=1&lm=I&seclog=0&msppjph=1

When Code grab this URL from HttpWebRequest object it goes upto the redirection page like:
<code>
<!-- ServerInfo: BAYPPLOGU2B02 2005.06.29.20.13.21 Live1 ExclusiveNew LocVer:0 -->
<!-- PreprocessInfo: ppbuild:PASSBLD01, Wed 06:29:2005-19:14:04.43 -- Version: 3,100,2254,0 -->
<html dir="ltr"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><base href="http://login.passport.net/pp310/"/><meta http-equiv="refresh" content="8;url=http://login.passport.net/uilogout.srf?id=2&lm=I&cbid=24325&lc=1033&ec=1" /><script type="text/javascript">var aID=new Array();if(aID.length==0){ RetRU();}var aLIn=new Array(aID.length);var fThirdPartyEnabled = -1;for(var i=0;i<aLIn.length;i++){ aLIn[i]=0;}var iTImg=0;function SetImg(idx,fGB){ }
function SO(idx,fGB){ if (fThirdPartyEnabled == 0){   fGB = 0;}if(aLIn[idx]==0){ iTImg++;if(fGB==1){ aLIn[idx]=1;}else{ aLIn[idx]=2;}SetImg(idx,fGB);if((aLIn.length==iTImg) && (fThirdPartyEnabled != -1)){ Ret();}}}
function ThirdChk(fEnabled)
{ fThirdPartyEnabled = fEnabled;for(var i=0;i<aLIn.length;i++){ if((aLIn[i]==1) || (aLIn[i]==2)){ if (fThirdPartyEnabled!=1){ aLIn[i]=2;}SetImg(i, aLIn[i]);}}if(aLIn.length==iTImg){ Ret();}}
function Ret(){ var szVS="";var szNS="";var fSUI=false;for(var i=0;i<aLIn.length;i++){ if(aLIn[i]!=1){ fSUI=true;}if(aID[i].indexOf("SID")!=-1){ var sSID=aID[i].substring(0,aID[i].length-3);if(szVS!=""){ szVS+="$";}szVS+=sSID;}else{ if(szNS!=""){ szNS+="$";}szNS+=aID[i];}}if(szVS!=""){ SVis(szVS);}else{ DVis();}if(szNS!=""){ SPPV(szNS);}else{ DPPV();}if(fSUI){ top.location.replace("http://login.passport.net/uilogout.srf?id=2&lm=I&cbid=24325&lc=1033&ec=1");}else{ RetRU();}}function DVis(){ document.cookie="MSPVis=+; expires=Thu, 30 Oct 1980 16:00:00 GMT; path=/; domain=.passport.net";}function DPPV(){ document.cookie="MSPNSVis=+; expires=Thu, 30 Oct 1980 16:00:00 GMT; path=/; domain=.passport.net";}function SVis(szVS){ var dPD=new Date(2037,11,30);document.cookie="MSPVis="+szVS+"; expires="+dPD.toGMTString()+"; path=/; domain=.passport.net";}function SPPV(szNS){ var dPD=new Date(2037,11,30);document.cookie="MSPNSVis="+szNS+"; expires="+dPD.toGMTString()+"; path=/; domain=.passport.net";}function RetRU(){ top.location.replace("http://login.passport.com/login.srf?lc=1033&sf=1&id=2&ru=&tw=0&fs=0&kv=0&cb=&cbid=24325");}function UILog(){ top.location.replace("http://login.passport.net/uilogout.srf?id=2&lm=I&cbid=24325&lc=1033&ec=1");}setTimeout("UILog()",8000);</script><script type="text/javascript">function OnBack(){}</script><title>Continue</title><meta name="PageID" content="i5041" /><meta name="SiteID" content="2" /><meta name="ReqLC" content="1033" /><meta name="LocLC" content="1033" /></head><body><script type="text/javascript">ThirdChk(1)</script></body></html>
</code>

This page redirect itself when it loads in Internet Explorer.
This is just one example, how can I tackle this scenario?

Need advice urgently.
Thanks in advance.
Irfan