procedure init LOCAL lnfile lnfile = fcreate("c:\temp\cTestInit.txt") fputs(lnFile, "cTest has been created at " + TTOC(datetime())) fclose(lnFile) endproc procedure getTestTime LOCAL lnfile lnfile = fcreate("c:\temp\cTestGetTestTime.txt") fputs(lnFile, "GetTestTime has been created at " + TTOC(datetime())) fclose(lnFile) return ttoc(datetime()) endproc procedure destroy LOCAL lnfile lnfile = fcreate("c:\temp\cTestDestroy.txt") fputs(lnFile, "cTest has been destroyed at " + TTOC(datetime())) fclose(lnFile) endproc enddefine2*** I create an EXE file, named TESTOLE.EXE where the class cTest is included. The Type Library looks like this:
VB4SERVERINFO HKEY_CLASSES_ROOT\testole.cTest = cTest HKEY_CLASSES_ROOT\testole.cTest\NotInsertable HKEY_CLASSES_ROOT\testole.cTest\CLSID = {3A46F4A0-9E9C-11D0-8AA8-0000F87897FA} HKEY_CLASSES_ROOT\CLSID\{3A46F4A0-9E9C-11D0-8AA8-0000F87897FA} = cTest HKEY_CLASSES_ROOT\CLSID\{3A46F4A0-9E9C-11D0-8AA8-0000F87897FA}\ProgId = testole.cTest HKEY_CLASSES_ROOT\CLSID\{3A46F4A0-9E9C-11D0-8AA8-0000F87897FA}\VersionIndependentProgId = testole.cTest HKEY_CLASSES_ROOT\CLSID\{3A46F4A0-9E9C-11D0-8AA8-0000F87897FA}\LocalServer32 = testole.exe /automation HKEY_CLASSES_ROOT\CLSID\{3A46F4A0-9E9C-11D0-8AA8-0000F87897FA}\TypeLib = {3A46F4A1-9E9C-11D0-8AA8-0000F87897FA} ; TypeLibrary registration HKEY_CLASSES_ROOT\TypeLib\{3A46F4A1-9E9C-11D0-8AA8-0000F87897FA} HKEY_CLASSES_ROOT\TypeLib\{3A46F4A1-9E9C-11D0-8AA8-0000F87897FA}\1.0 = testole Type Library HKEY_CLASSES_ROOT\TypeLib\{3A46F4A1-9E9C-11D0-8AA8-0000F87897FA}\1.0\0\win32 = testole.tlb3*** Start DCOMCNFG and configure the OLE Server.
SET oIISPath = GetObject("IIS://LOCALHOST/W3SVC/1/ROOT") ?oIISPath.AspAllowOutOfProcComponents Truesince this setting inherits also to my web page at:
SET oIISPath = GetObject("IIS://LOCALHOST/W3SVC/1/ROOT/DELPHIN") ?oIISPath.AspAllowOutOfProcComponents TrueI have deleted all registry settings from IIS 3.0 with AllowOutOfProcCmpnts since I have been told that IIS 4.0 now uses the metabase to set and check these settings.
...asp code... SET oNIS = server.createobject("testole.ctest")6*** Error Message when trying to instantiate this OLE Server:
Server object error 'ASP 0177 : 800706ba' Server.CreateObject Failed /delphin/aspfiles/NISLocal.asp Line 58 The RPC server is unavailable7*** Conclusion: