You're probably falling victim to
this problem which results in the simple
RegisterFileLocation not working Windows.
It should be possible to use the following “hack” instead (requires 3.2.0):
begin
TSimpleFileModule.BaseDir := 'C:\inetpub\wwwroot\Demos';
HTTPRouter.RegisterRoute('/Demos/*', TSimpleFileModule.HandleSimpleFileRequest);
// ...
end.
Or if your program is started from
C:\ as well you can try this:
RegisterFileLocation('/Demos/*','/inetpub\wwwroot\Demos');
This is a so called drive absolute path and uses the drive of the current working directory as root (this is done by Windows). The ‘/’ instead of ‘\’ is necessary because of the code in
RegisterFileLocation, otherwise ‘\’ would be okay.