Posts: 16
Threads: 3
Joined: Jun 2020
Reputation:
0
Location: Mexico
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
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
Hum... yes.
Thanks, Dan, I'll fix it
Cheers
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
Done, plus a few other minor fixes. :-)
Posts: 16
Threads: 3
Joined: Jun 2020
Reputation:
0
Location: Mexico
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
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
08-22-2022, 06:53 AM
(This post was last modified: 08-22-2022, 06:57 AM by Alexandre Machado.)
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?
Posts: 16
Threads: 3
Joined: Jun 2020
Reputation:
0
Location: Mexico
Alexandre,
yes, I understand. Will look closely on what is different. Keep you posted, thanks for the help.
Posts: 16
Threads: 3
Joined: Jun 2020
Reputation:
0
Location: Mexico
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
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
I wonder if Startdocs requires COM... That is the only possible explanation