General discussion

Locked

Counters Component (ASP)

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

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

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 ****=Server.SET MyCount=Server.CreateObject("MSWC.Counters")
%>
For application scope you can use the follwing code as well as the above code
<OBJECT
RUNAT=Server
SCOPE=Application
ID=Counter
PROGID="MSWC.Counters">
</OBJECT>

Collapse -

Counters Component (ASP)

by Kyle B. In reply to Counters Component (ASP)
Collapse -

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

Collapse -

Counters Component (ASP)

by Kyle B. In reply to Counters Component (ASP)
Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums