Google Analytics İzleme

02 Mart 2012

-2147483638 hatası

Klasik ASP sayfasından WCF web servisini çağırma esnasında şu şekilde bir hata veriyor:

Err.number: -2147483638 Err.Description: The data necessary to complete this operation is not yet available. Err.Source: msxml3.dll

Sanırım çağrım asenkron yapıldığı için ve bizde gelen sonuca göre işlem yapıyorsak bu hata oluyor.
Bu hata olmaması için yapılan çzöümler şu şekilde:
çözüm 1: çağrının asenkron olmaması lazım.
çözüm 2: bir diğer çözüm ise xml çağrım objesinin readystate sonucu ve durumu kontrol edilmeli.
Sonsuz döngü içinde de readystate'in 4 olması beklenebilir.
çözüm 3: asenkron sonucç yakalnınca çalışan varsa callbak function'lar kullanılabilir.

Şu anda bu çözümleri uygulamadım, başarırsam buraya yazacağım.

Kaynaklar:http://www.vbforums.com/showthread.php?t=336815
http://forums.devx.com/showthread.php?t=84942
http://www.msghelp.net/showthread.php?tid=87283
http://www.codeguru.com/forum/showthread.php?t=182850


Zaman aşımlarını ayarlamak setTimeouts metodu bulunuyormuş:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms760403(v=vs.85).aspx

open Method (ServerXMLHTTP/IServerXMLHTTPRequest)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms763809(v=vs.85).aspx


Data not yet available error
http://www.aspmessageboard.com/showthread.php?231704-Data-not-yet-available-error

XML and ASP problem
http://forums.devx.com/showthread.php?100302.html


Set xmlHTTP = Server.CreateObject("Msxml2.XMLHTTP")
xmlHTTP.Open "POST", sURL, False
xmlHTTP.Send strGonderilenVeri
strAlinanVeri = xmlHTTP.responsetext
http://forum.ceviz.net/asp/81374-msxml3dll-error-8000000a-2.html

XMLHTTP Get Issue
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_27557317.html


Consuming Web Service using classis ASP
http://www.44342.com/asp-f128-t15146-p1.htm

 Image Resize Part II - resize image on the fly
http://forums.aspfree.com/code-bank-54/image-resize-part-ii-resize-image-fly-135703-2.html

--

function send_XML(xmlStr, urlStr, varAsync)
 set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
 xmlhttp.open "POST", urlStr, varAsync
 Starttime = Now()
 xmlhttp.send xmlStr
 
 if varAsync = true then
  Do While Not gotData(xmlhttp)
   if DateDiff("s", StartTime, now()) >= 3 then '(Three second timeout)
    exit do
   else
   end if
  Loop
  If not gotData(xmlhttp) then
               responseXML =  "<failed>true</failed>"
  else
   responseXML = xmlhttp.responseText
  End If
 else
  responseXML = xmlhttp.responseText
 end if
 set xmlhttp = nothing
 send_XML = responseXML
end function
 
Function gotData(tmpxml)
on error resume next
    gotData = True
    If (tmpxml.ResponseText <> "") and (tmpxml.ResponseText = "") Then
        'Only way to get in here is if an error occured.
        gotData = False
    End If
err.clear
End Function


http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23350855.html

--


Another common cause for this error is that the request has been sent
asynchronously, and the application has not waited for the response to be
received before trying to access the response data. Requests are sent
asynchronously if the third parameter to the Open method is True. For
example, 
    winhttpobject.Open "GET", "http://Url" ,True   ' True means async; False
means synchronous. 
If you send the request asynchronously, then you need to use the
WaitForResponse method before the responseText (or responseBody or
responseStream) property can be used. The WaitForResponse method waits for
the response to an asynchronous request to be received. So your code would
look something like this: 
    Set winhttpobject = CreateObject("WinHttp.WinHttpRequest.5") 
    winhttpobject.Open "GET", "http://Url" ,True   ' True means async; False
means synchronous. 
    winhttpobject.WaitForResponse 
    Data = winhttpobject.ResponseText 
    Set winhttpobject = Nothing 
Regards, 
Stephen Sulzer
Microsoft Corporation 


https://groups.google.com/group/microsoft.public.winhttp/tree/browse_frm/month/2002-07/02f817048121c9b6?rnum=1&lnk=ol&pli=1

--

How to receive a webservice in classic ASP
http://www.experts-exchange.com/Web_Development/Web_Services/Q_27579097.html



Hiç yorum yok: