Atozed Forums
ISAPI dll with StarDocs hangs on SignUP - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: ISAPI dll with StarDocs hangs on SignUP (/thread-2834.html)

Pages: 1 2


ISAPI dll with StarDocs hangs on SignUP - alex.trejo@tttnet.com.mx - 08-10-2022

Intraweb 14.2.6 Delphi 10.2.3

Using Stardocs platform to let user navigate through multiformat documents, standalone version works perfect. 
When deployed as dll, application hangs starting up.

StarDocs connection details are defined on ServerController.OnCreate:

    StarDocs := TgtStarDocsSDK.Create(nil);
    StarDocs.ConnectionSettings.ApiServerUri:= 'http://api.gnostice.com/stardocs/v1';
    StarDocs.ConnectionSettings.ApiKey:=API_key
    StarDocs.ConnectionSettings.ApiSecret:=API_secret;
    StarDocs.Preferences.DocPassword.ForceFullPermission:= True;
    // Authenticate
    StarDocs.Auth.loginApp;


Here is where the dll hangs. No errors, no messages, just hangs. Application pool also stays up and needs to be stopped manually.
Any clues?
Best regards,
Alex


RE: ISAPI dll with StarDocs hangs on SignUP - Alexandre Machado - 08-14-2022

I've seen many processes running under IIS to fail due to credentials used by application pool or application itself not having all the necessary permissions. In your case seems very likely.

I suggest that you start from here: https://docs.atozed.com/docs.dll/deployment/isapi/Deploying%20ISAPI%20using%20IIS.html

Please see items 2 and 3 of that document. Set an specific user for both application and application pool and give it local admin privileges. See if it works.


RE: ISAPI dll with StarDocs hangs on SignUP - DanBarclay - 08-15-2022

(08-14-2022, 10:59 PM)Alexandre Machado Wrote: I've seen many processes running under IIS to fail due to credentials used by application pool or application itself not having all the necessary permissions. In your case seems very likely.

I suggest that you start from here: https://docs.atozed.com/docs.dll/deployment/isapi/Deploying%20ISAPI%20using%20IIS.html

Please see items 2 and 3 of that document. Set an specific user for both application and application pool and give it local admin privileges. See if it works.

FYI, may need edit?  Just glancing through I noted there are two number(2):

2. Installing the pre-requisites on your Windows Server
2. Creating an Application Pool for your ISAPI Application

Dan


RE: ISAPI dll with StarDocs hangs on SignUP - Alexandre Machado - 08-15-2022

Hum... yes.

Thanks, Dan, I'll fix it

Cheers


RE: ISAPI dll with StarDocs hangs on SignUP - Alexandre Machado - 08-15-2022

Done, plus a few other minor fixes. :-)


RE: ISAPI dll with StarDocs hangs on SignUP - alex.trejo@tttnet.com.mx - 08-15-2022

Alexandre,
thanks for you reply. The user under which the app pool runs has local administrative priviledges. The IIS/app pool was configured according to the link you mentioned. Anything else that could be causing this behaviour?
Best regards,
Alex


RE: ISAPI dll with StarDocs hangs on SignUP - Alexandre Machado - 08-22-2022

Due to the name of the call where the problem happens:

StarDocs.Auth.loginApp;

I'm almost 100% sure that some permission is missing. Or... this call may require COM. Does it?

There is no difference between an ISAPI application and any other application, other than the ISAPI is a DLL that runs in the context of another process (the executable that loads the ISAPI dll is named w3wp.exe, which is basically the core of the IIS "engine"). Whatever runs in one application and doesn't run in an ISAPI process can be translated as "it runs as myapp.exe, with IAMTheUser but doesn't run as w3wp.exe SystemIsTheUser.
See?


RE: ISAPI dll with StarDocs hangs on SignUP - alex.trejo@tttnet.com.mx - 08-22-2022

Alexandre,
yes, I understand. Will look closely on what is different. Keep you posted, thanks for the help.


RE: ISAPI dll with StarDocs hangs on SignUP - alex.trejo@tttnet.com.mx - 08-22-2022

After checking privileges, everything looks ok with the account under which this isapi runs. It has all privileges. 
Kept trying, and what I did, is I moved Stardocs login authentication block previously shown from ServerController.OnCreate (where the Stardoscs documentation states it should be), to the entry form's OnCreate event. And it works! I really don't know why, or what proceses are different between exe and isapi, or when things are done. But what it seems clear is that in the ServerOnCreate when in isapi something that Stardocs expects is not ready, and in exe seems to be OK. Can you make anything out of this behaviour?
Best regards,
Alex


RE: ISAPI dll with StarDocs hangs on SignUP - Alexandre Machado - 08-29-2022

I wonder if Startdocs requires COM... That is the only possible explanation