Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ISAPI dll with StarDocs hangs on SignUP
#1
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
Reply
#2
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/deploym...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.
Reply
#3
(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/deploym...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
Reply
#4
Hum... yes.

Thanks, Dan, I'll fix it

Cheers
Reply
#5
Done, plus a few other minor fixes. :-)
Reply
#6
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
Reply
#7
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?
Reply
#8
Alexandre,
yes, I understand. Will look closely on what is different. Keep you posted, thanks for the help.
Reply
#9
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
Reply
#10
I wonder if Startdocs requires COM... That is the only possible explanation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)