|
<< Click to Display Table of Contents >> Navigation: Forum > IIS isapi bug |
02-22-2019, 07:00 AM:
xe7, iw15.0.15
I am trying to debug and iw isapi application that runs fine as a Standalone but not as an isapi dll under iis.
When I try to start up the isapi application I get a server 500 error with the following
Exception: Exception
No HTTP hook has been set.
Any ideas would be appreciated.
I found the line of the error. In the oncreate of the servercontroller I am trying to call this calll.
LoadXMLDocument(ASettingsXMLName);
I actually get this error.
Error: The system cannot locate the object specified.
Why would this call work under SA but not ISAPI?
02-22-2019, 10:41 AM:
Hi Joel. If this is an external file, isapi is located in different path. This code read file in the same path.
Code:
if IsLibrary then
txt := ExtractFilePath( GetModuleName( HInstance ) ) + 'MyINIFile.ini'
else
txt := ExtractFilePath( ParamStr(0) ) + 'MyINIFile.ini';
02-22-2019, 02:02 PM:
You an use gSC.AppPath to do the same with shorter syntax.
02-23-2019, 02:46 PM:
Thanks.
I actually had to use IW.Common.System.gsAppPath to get it to work. (i think this is because appPath is iw12 or less.)
02-28-2019, 03:54 PM:
You probably just needed to add the servercontroller unit to your uses clause.