Click to See Complete Forum and Search --> : COM And ASP
razzaj
Nov 20th, 2000, 04:48 PM
I am trying to initialize a WIinsock control in an ActiveX DLL By creating an instance of it in ASP and Callinga Connect Function in the Class .. this function is supposed to Open a winsock Connection to a certain IP and Port and wait for an Approoval ...
But it keeps giving me the Error : Obejct variable not set ... I know My ASP Code is not wrong .. so the Error is most probably from the DLL ... how can I slove that ??
- Thans in advance -
fhussain
Nov 20th, 2000, 07:43 PM
Whats the error number? And error description? Are other com components working on this machine? Are you using PWS or IIS?
razzaj
Nov 21st, 2000, 08:51 AM
I am using PWS and the error is :
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/recon/Default.asp, line 3
800401f3
Here is the ASP Code :
<%
dim obj
set obj = server.createobject ("Socket2.Connect")
response.write obj.Connect("192.168.3.56",2001)
response.write obj.send("ssss")
set opj = nothing
%>
monte96
Nov 22nd, 2000, 09:12 AM
Is the DLL registered on the server? Can you instantiate it with a VB App?
razzaj
Nov 22nd, 2000, 08:08 PM
Yes I could when I first wrote and compiled and then Regirtered the Dll ... but then it used to give me when called from ASP as I decribed abov e this error :" Obejct variable not set "
I dont know what is wrong now It tells me Cannot Create Object ...
Mongo
Nov 23rd, 2000, 04:14 AM
Don't know if this will help:
http://support.microsoft.com/support/kb/articles/Q258/9/32.ASP
Chris
Nov 23rd, 2000, 06:45 AM
I think your error may casue by the obj.send("ssss") command. You should wait for the Connect event before you can really send something out with the Winsock.
And you no need to set your Obj to nothing in ASP code, this because ASP will automatically release the Object upon completed running the page code.
<%
dim obj
set obj = server.createobject ("Socket2.Connect")
response.write obj.Connect("192.168.3.56",2001)
**Your COM should be able to notified you either it successful connected to the remote PC before you can proceed to next statement.
response.write obj.send("ssss")
--> set opj = nothing (Should be remove)
%>
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.