I have written an ActiveX dll in VB that uses the Winsock.dll (I tried the mswinsck.ocx first but have the same problem). It is called MyPriceTcpApp.dll with a class called TCPIP.
I am trying to creating an object to use my code within ASP.
eg
<%
Dim lPrices
Dim lWinTcp
Set lWinTcp = Server.CreateObject("MyPriceTcpApp.TCPIP"
lWinTcp.Host = "158.23.2.3"
lWinTcp.Port = "56595"
lWinTcp.Command = "GET PRICE FORDCAR"
lWinTcp.Execute
lPrices = lWinTcp.GetData
Response.Write "Price is " & lPrices
Set lWinTcp = nothing
%>
My Asp app hangs when I perform the execute. I see the progress bar increase but nothing happens. The command isn't being sent to the pricesserver.
The MyPriceTcpApp works when I run the code in a VB test app and it works on the server when I run it as a .vbs file
So why should it hang as an ASP component? I thought it was a Winsock problem hence the rewrite from MSWINSCK.OCX to the native API calls in WINSOCK.DLL and a microsoft site said the OCX should not be used in IIS applications. But it works as a VBS script. So it cant be a winsock issue or can it?
I have registered the MyPriceTcpApp.dll on the server using REGSVR32 and I can see it in OLEVIEW.
My server is a Windows 2000 server running IIS.
If I can't get this working how else could I send a message and get a response from a port on a server into a webpage?
(The prices string/variant when it comes back from the dll is actually an XML string but I've simplified the example code.)
I am trying to creating an object to use my code within ASP.
eg
<%
Dim lPrices
Dim lWinTcp
Set lWinTcp = Server.CreateObject("MyPriceTcpApp.TCPIP"
lWinTcp.Host = "158.23.2.3"
lWinTcp.Port = "56595"
lWinTcp.Command = "GET PRICE FORDCAR"
lWinTcp.Execute
lPrices = lWinTcp.GetData
Response.Write "Price is " & lPrices
Set lWinTcp = nothing
%>
My Asp app hangs when I perform the execute. I see the progress bar increase but nothing happens. The command isn't being sent to the pricesserver.
The MyPriceTcpApp works when I run the code in a VB test app and it works on the server when I run it as a .vbs file
So why should it hang as an ASP component? I thought it was a Winsock problem hence the rewrite from MSWINSCK.OCX to the native API calls in WINSOCK.DLL and a microsoft site said the OCX should not be used in IIS applications. But it works as a VBS script. So it cant be a winsock issue or can it?
I have registered the MyPriceTcpApp.dll on the server using REGSVR32 and I can see it in OLEVIEW.
My server is a Windows 2000 server running IIS.
If I can't get this working how else could I send a message and get a response from a port on a server into a webpage?
(The prices string/variant when it comes back from the dll is actually an XML string but I've simplified the example code.)