View Single Post
  #1 (permalink)  
Old March 24th, 2007, 09:35 PM
prakharbirla prakharbirla is offline
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prakharbirla Send a message via MSN to prakharbirla Send a message via Yahoo to prakharbirla
Default msxml3.dll error '800c0014'

Hi!
Does anyone know about this error in MSXML2.ServerXMLHTTP? It says:
msxml3.dll error '800c0014'

A redirection problem occured.
--
I tired it the browser, and I think this pare redirects and lot but I dont understand why should there be any problems!

The error particularly occurs on this line
Code:
xmlhttp.send HiddenString
in the following code
Code:
<%
Username = "USERNAME@hotmail.com"
Password = "PASSWORD"
Response.Write PassportLogin(Username, Password)
    Function PassportLogin(User, Pass)
        set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
        xmlhttp.open "GET", "http://login.live.com/login.srf?lc=1033&id=10", false
        xmlhttp.send ""
        PP_LoginForm = xmlhttp.responseText
        FormStart=InStr(1,PP_LoginForm,"<form name=")
        FormStart=InStr(FormStart,PP_LoginForm,"action=")+8
        StringTemp = "onsubmit"
        FormEnding=InStr(FormStart-1,PP_LoginForm,StringTemp)-2
        FormTarget= Mid(PP_LoginForm,FormStart,FormEnding-FormStart)
        StringInvert = """"
        HiddenString=""
        HiddenStart=InStr(FormStart,PP_LoginForm,"<input type=""hidden"" ")
            do while(Not(HiddenStart=0))
            HidNameStart=InStr(HiddenStart,PP_LoginForm,"name=")+6
            HidNameEnding=InStr(HidNameStart,PP_LoginForm," ")-1
            TempName=Mid(PP_LoginForm,HidNameStart,HidNameEnding-HidNameStart)

            HidNameEnding=InStr(HidNameStart,PP_LoginForm,"value=")+7
            HidValueEnding=InStr(HidNameEnding,PP_LoginForm,"/>")-1

            TempValue=Server.URLEncode(Mid(PP_LoginForm,HidNameEnding,HidValueEnding-HidNameEnding))
                if TempName="PPSX" then
                TempValue = "Pass"
                end if
            HiddenString = HiddenString & TempName & "=" & TempValue & "&"
            HiddenStart=InStr(HidValueEnding,PP_LoginForm,"<input type=""hidden"" ")
            loop
        PP_LoginForm=""
            if len(HiddenString)>0 then
            HiddenString=Mid(HiddenString,1,Len(HiddenString)-1)
            end if
        xmlhttp.open "POST", FormTarget, false
        xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
        Response.Write Server.HTMLEncode(HiddenString & "&login=" & Server.URLEncode(User) & "&passwd=" & Server.URLEncode(Pass) & "&LoginOptions=3&SI=Sign+in")
        Response.Flush
        xmlhttp.send HiddenString & "&login=" & Server.URLEncode(User) & "&passwd=" & Server.URLEncode(Pass) & "&LoginOptions=3&SI=Sign+in"
        PP_LoginResult = xmlhttp.responseText
        SavedCookies = GetCookies(xmlhttp.getAllResponseHeaders())
        Response.Write SavedCookies & ""
        Response.Write Server.HTMLEncode(PP_LoginResult) & ""

        HiddenString=""
        HiddenStart=InStr(1,PP_LoginResult,"<input type=""hidden"" ")
            do while(Not(HiddenStart=0))
            HidNameStart=InStr(HiddenStart,PP_LoginResult,"name=")+6
            HidNameEnding=InStr(HidNameStart,PP_LoginResult," ")-1
            TempName=Mid(PP_LoginResult,HidNameStart,HidNameEnding-HidNameStart)

            HidNameEnding=InStr(HidNameStart,PP_LoginResult,"value=")+7
            HidValueEnding=InStr(HidNameEnding,PP_LoginResult,">")-1

            TempValue=Server.URLEncode(Mid(PP_LoginResult,HidNameEnding,HidValueEnding-HidNameEnding))
            HiddenString = HiddenString & TempName & "=" & TempValue & "&"
            HiddenStart=InStr(HidValueEnding,PP_LoginResult,"<input type=""hidden"" ")
            loop
        PP_LoginResult=""
            if len(HiddenString)>0 then
            HiddenString=Mid(HiddenString,1,Len(HiddenString)-1)
            end if

        xmlhttp.open "POST", "https://account.live.com/SummaryPage.aspx?mkt=en-us&id=10&vv=450&lc=1033&wa=wsignin1.0", false
        xmlhttp.setRequestHeader "Cookie", "Passport=Microsoft"
        xmlhttp.setRequestHeader "Cookie", SavedCookies
        xmlhttp.send HiddenString
        Response.Write Server.HTMLEncode(PP_LoginResult) & ""
    End Function


    Function GetCookies(Header)
        cookieString=""
        Temp = Split(Header,vbCrlf)
            for i=0 to UBound(Temp)
            HeadTag=""
            On Error Resume Next
            HeadTag = Mid(Temp(i),1,11)
                if HeadTag="Set-Cookie:" then
                CookieContent=""
                HeadCookie = Mid(Temp(i),12,Len(Temp(i)))
                HeadCookieEnding=InStr(1,HeadCookie,";")
                    if HeadCookieEnding=0 then
                    CookieContent=HeadCookie
                    else
                    CookieContent=Mid(HeadCookie,1,HeadCookieEnding-1)
                    end if
                cookieString = cookieString & CookieContent & ";"
                end if
            next
    GetCookies=cookieString
    End Function
%>
Actually I'm trying to login into Microsoft's passport service! Please help me rectify this error ;)