Results 1 to 7 of 7

Thread: COM And ASP

  1. #1

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    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 -
    - regards -
    - razzaj -

  2. #2
    New Member
    Join Date
    Nov 2000
    Location
    US of A
    Posts
    5
    Whats the error number? And error description? Are other com components working on this machine? Are you using PWS or IIS?


  3. #3

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    I am using PWS and the error is :


    Code:
    Server object error 'ASP 0177 : 800401f3' 
    
    Server.CreateObject Failed 
    
    /recon/Default.asp, line 3 
    
    800401f3

    Here is the ASP Code :

    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 
       
       
       %>
    - regards -
    - razzaj -

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Is the DLL registered on the server? Can you instantiate it with a VB App?
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  5. #5

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    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 ...

    - regards -
    - razzaj -

  6. #6
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Leavenworth KS USA
    Posts
    482

  7. #7
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    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.

    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)
    %>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width