Asp - INET control Webserver 2008

This line on an asp page on webserver 2008 errors out:
Set inet = Server.CreateObject("InetCtls.Inet")


Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

This page is works on a development box.
I think it's because I have Visual Studio installed.

I've tried this :
http://support.microsoft.com/default.aspx?scid=kb;en-us;159923
"License Package Authoring Tool"
But it's still not working.
That tool refers to using it for ActiveX controls put on a page with an <object> tag.

As you can see, I'm just doing a server.createobject.
not embedding an <object>
wininet.dll is on the machine.

Anybody have and idea why this won't load?
Thanks




awalkintheparkAsked:
Who is Participating?
 
Gary DavisDir Internet SvcsCommented:
Just change POST to GET. Remove the PostData.
PostData for POST is a string variable containing the form keywords and values separated by ampersands like "product=shirt&color=light+green". For GET, you would simply put the parameters in the Url's QueryString.
0
 
Gary DavisDir Internet SvcsCommented:
Why not use the more-current msxml.XmlHttpReqeust object with your classic Asp code?
0
 
awalkintheparkAuthor Commented:
I'm using the INET  to retrieve an HTML page into a string variable, used later in the page.
Do you have an example of msxml.XmlHttpReqeust used this way?
I looked around , haven't found one yet.

here's what I'm doing now:
inet.Url = url
stringvariable = inet.OpenURL()
then other things happen to the string

Thanks
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
awalkintheparkAuthor Commented:
Using msxml.XmlHttpReqeust :

Dim xmlhttp
Set xmlhttp =Server.CreateObject("Msxml2.XMLHTTP")

xmlhttp.open "GET", url,true
stringvariable = xmlhttp.responseText

generates this:
msxml3.dll error '8000000a'

The data necessary to complete this operation is not yet available.

Is there some timing issue on when it completes its request before the responseText is available?

xmlhttp.open "GET", url,true
--> Something else has to happen here?
stringvariable = xmlhttp.responseText

0
 
awalkintheparkAuthor Commented:
I don't know how to
What an equivalent in VBscript for this would be:

xmlhttp.onreadystatechange = function () {
   if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
         // Data is available now
         DoSomethingUseful(xmlhttp.responseText);
      }
   }
}
xmlhttp.send();

On the other hand, I know the INET control works.
And it's  2 lines to get the job done when the thing can be loaded.

The solution to loading then INET dll would be nice,
or a working example in VBscript that uses Msxml2.XMLHTTP
to request a URL and has xmlhttp.responseText available.



0
 
Gary DavisDir Internet SvcsCommented:
This is what I use. No need for onreadystatechange - this is synchronous and on the server, not the client.
 

Set objWinHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
objWinHttp.Open "POST", Url, False
objWinHttp.setRequestHeader "Content-Type", "text/namevalue"
objWinHttp.Send PostData ' *********** POST data ***********
transResponse = objWinHttp.ResponseText ' Get the response.

Open in new window

0
 
awalkintheparkAuthor Commented:
I'm do a "GET" from my server side script.
You are doing a POST.  
Also ,  in your example what is  PostData?
Would that be form data or something you are sending to the server?



0
 
awalkintheparkAuthor Commented:
For the record, and to save the next guy some time  the working code is at the end of this posting.
. I think one key was setting the 3 parameter in  .open to false.
It's otherwise very awkward to build an equivalent in Vbscript to this javescript code that is in use in all examples I found:  

xmlhttp.onreadystatechange = function () {
   if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
         // Data is available now
         DoSomethingUseful(xmlhttp.responseText);
      }
   }
}

Object model here:
http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx

.open just sets parameters, though the method name implies it's going to open..
Requires that you  .send to execute.

This woks:
xmlhttp.open "GET", url,false
xmlhttp.send
myStringVar  = xmlhttp.ResponseText ' Get the response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.