General discussion

  • Creator
    Topic
  • #2081202

    Counters Component (ASP)

    Locked

    by kyle b. ·

    Could someone please let me know how to create an instance of the Counters Component in an .asp page, not in the global.asa file.(I know you are suppose to only create this object once in the glabal.asa file but is there another way?) I have tried this so far and have come out with an error that says “invalid class string”. Here is the code i used:

    <% SET MyCount=Server.CreateObject( "MSWC.Counters" ) %>

    Any suggestions? Any help is appriciated and thanks in advance!

    Kyle

All Comments

  • Author
    Replies
    • #3896055

      Counters Component (ASP)

      by pramesh ·

      In reply to Counters Component (ASP)

      What you had written is correct. Please check for the following files
      Counters.dll
      Counters.txt
      For page scope
      <% set cunt=Server.SET MyCount=Server.CreateObject("MSWC.Counters") %>
      For application scope you can use the follwing code as well as the above code

    • #3896044

      Counters Component (ASP)

      by ke4vtw ·

      In reply to Counters Component (ASP)

      Make certain the DLL containing MSWC.Counters is registered. It seems thta the createobject is not successfully creating the object due to a registration problem.

      Use the REGSVR32 application to register the DLL. It’s located in the WINNT\SYSTEM32 folder. Just run it and pass the DLL filename as a parameter like this:

      REGSVR32 [Drive:][\Path\]DLLNAME.EXT

Viewing 1 reply thread