Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxisapi
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00621529
Message ID:
00708546
Vues:
29
Ok... I'll try, but its been quite a while since messing around with FoxISAPI.

1. When you create your app and the class is set to "OLEPUBLIC", this creates necessary components for the .TLB and .VBR files which ultimately hit the registry.

2. From the project manager, right-click and choose Project Info. The 3rd tab is for "Servers". Each of the "classes" you have defined as OLEPublic should be listed to the left. Make sure that each one has the "Instancing" combobox set to "single-use", NOT "multi-use" -- critical. Also, make sure each has some type of "Description" value. This is the value that will be seen in the DCOMCNFG form for Windows. Rebuild the project/exe if changed.

3. As for pathing stuff, this CAN be crucial and cause lots of frustration. When the COM server is loaded via FoxISAPI, the "Load" event is obviously the first key thing called upon when the object is created. When INetInfo.exe (calls FoxISAPI and ultimately your COM server), the value for

SET( "DEFAULT" ) + CURDIR()

will be (ex:) C:\Windows\system32\ directory -- where the INETINFO is. Therefore, you may want to immediately force a CD to a development directory where you know things will be located from there.

Yes, in the sample you have, you were using an explicit path which would work, but just a heads-up as you may get deeper into things.

4. Do a Start / Run / "DCOMCnfg"... This will bring up the Distributed COM manager. This will list a bunch of "Applications"... of which, yours should be listed based on the description given in the project manager. If not, it will be some of the goofy GUID#s listed at the top... Double click to find the one for you.

5. On the security tab, you need to who can Access and Launch the application... Typically this will be the IUSR_{machine name} at a minimum.

6. On the identity tab, make sure you click radio button for "Interactive User".

7. From IIS, If you copied the FoxISAPI.dll and FoxISAPI.ini into ie: C:\Inetpub\Scripts\ directory, you need to make sure that the system's INTERACTIVE USER has READ, WRITE AND EXECUTE availability to this directory. This is also where FoxISAPI will put its temporary .INI files which hand-off the data to the COM server (by passing the file name created as one of the parameters to the com object's method). whether you use the parms or not is your plan... However, there will be 3 paramters passed in.

8. Also from IIS, in the "Virtual Directory" you have to your root (such as "//localhost/Scripts". This needs to have properties set to read/write/execute priviledges, otherwise, the dll won't be allowed to run, even though the other directory / security issues allow it.

9. Now, the URL... The url is in the format of... (based on "Scripts" being the virtual directory under the //localhost leve)

//localhost/Scripts/FoxISAPI.DLL/NameOfExe.NameOfClass.NameOfMethod

The portion for
NameOfExe.NameOfClass is what becomes visible via the .TLB (Type Library) and configured via the DCOMCNFG section. The method has to be a valid method on the given class...

Sometimes -- and I can't remember how/why, such a link would still throw-up unless you ended it with a ? (...NameOfClass.NameOfMethod? ). The ? identifies the start of "parameters" in the URL that will ultimately be passed to the COM server and available as part of the parameters list (I think the third parameter).

Anyhow, HTH and let me know how things progress for you.

Don
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform