[fpc-pascal] FastCGI on Windows IIS
md at delfire.net
Mon Apr 25 04:08:51 CEST 2016
On Sun, Apr 24, 2016 at 6:21 PM, Michael Van Canneyt
<michael at freepascal.org> wrote:
> On Sun, 24 Apr 2016, Marcos Douglas wrote:
>>> ...but it does not solve the problem. :(
>> My env: Lazarus 1.5 r50201M FPC 2.6.5 i386-win32-win32/win64
>> So I took his example here \packages\fcl-web\examples\helloworld
>> Compiled it. ISS configured to port 2020.
>> Call in browser http://localhost:2020/helloworld.exe/func1call
> I have never tested the Fastcgi support with IIS.
> The problem is probably that IIS does not provide the same PATHINFO
> environment variable as Apache or NGINX.
> The PATHINFO environment variable is used to determine what module needs to
> be invoked. You can influence this by setting and handling the OnGetModule
> event of the TFastCGIApplication application object. In this event, you can
> examine the request, and return the class of the module that must be
> When you do, please save the contents of PATHINFO to some file, and send it
> here, so I can examine it and adapt the implementation so it can handle IIS
> as well.
Doesn't matter if is CGI or FastCGI. Same problem.
I did more tests.
In my example, I have 1 Module "pdf" and 1 Action "act1".
The Module has a DataModuleRequest event:
AResponse.Content := 'default';
Handled := True;
The Action has a Request event:
AResponse.Content := 'list';
Handled := True;
#1 Call Action
Result: error - Could not determine HTTP module for request "act1"
#2 Call Module/Action
Result: print - "default"
If you do not have time, maybe I can try to fix. But how we
can know what Server is running (Apache, IIS, etc)?
More information about the fpc-pascal