Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveX OLE Server with VFP under IIS 4.0
Message
De
17/03/1998 06:38:20
Arturo Devigus
Devigus Engineering Ag
Zug, Suisse
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
ActiveX OLE Server with VFP under IIS 4.0
Divers
Thread ID:
00084976
Message ID:
00084976
Vues:
75
I have problems instantiating a VFP 5.0a SP3 OLE Server on IIS 4.0 final release on NT 4.0 Server SP3:


1*** The VFP OLE Server looks like this:

define class cTest as custom OLEPUBLIC
	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	

enddefine
2*** 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.tlb
3*** Start DCOMCNFG and configure the OLE Server.

Go to Default Security.
make sure that IUSR_ is available with Default Access Permissions.
make sure that IUSR_ to is available with Default Launch Permissions.

I read in an article from Calvin Hsia that the EXE requires that the server be defined for interactive use. To do this, perform the following steps:

Go to the Applications tab.
Select the Class (TFoxIsapi in the example).
Click Properties.
Go to the Identity tab.
Click The Interactive User.
Click Apply.

IMPORTANT: To exclude and sideeffects from insufficient rights, the IUSR_ and the new IWAM_ users are both set to ADMINISTRATOR rights during this testing phase!


4*** Prepare IIS to run Out Of Process OLE Servers

I checked the metabase key in IIS 4.0 using VB OLE Automation like this in the immediate window in VB:
SET oIISPath = GetObject("IIS://LOCALHOST/W3SVC/1/ROOT")
?oIISPath.AspAllowOutOfProcComponents
True
since this setting inherits also to my web page at:
SET oIISPath = GetObject("IIS://LOCALHOST/W3SVC/1/ROOT/DELPHIN")
?oIISPath.AspAllowOutOfProcComponents
True
I 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.


5*** In the ASP page, the following lines try to instantiate the OLE Server:
...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 unavailable
7*** Conclusion:
Can anyone tell me how I can run my OLE VFP 5.0 OLE Servers from within ASP Pages under IIS 4.0. Did anyone out there already successfully instantiate an OutOfProc OLE Server written in VFP 5.0? (not VB 5.0, I know and I tested, VB 5.0 works :() Help is greatly appreciated since we are already digging into this problem for now more than 2 weeks and cant't figure out what's the missing piece!! MMTIA for your assistance,

Arturo Devigus/ 17-March-1998
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform