Home Server
New Blog Posts: Merging Reports - Part 1 and Part 2

Webtier.ini

edited April 2011 in Server
This is a multi-part message in MIME format.

Comments

  • edited April 2011
    The WebTier ini-file is read just after the OnCreate event fires. It is only
    read when IniSettings.Enabled is True and the file exists. The IIS process
    that loads the ISAPI dll will need security access rights to read the file.

    The IIS host process is responsible for loading/unloading the ISAPI dll.
    This varies by IIS version and configuration.The latest IIS versions have an
    ‘application pool’ process that can be restarted via the IIS manager. If you
    are unsure as to whether you are forcing an unload, you can try rebooting
    the machine or launch the services administrator and restart the world wide
    web publishing service.

    You can either manually create the .ini file or at Delphi design-time one
    can be generated by closing the WebModule. When the WebTier is destroyed it
    will create the ini-file, if IniiSettings.Enabled is True and a FileName is
    specified. There is no ini-file creation at run-time.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011


    The IIS process is loading the dll, and i can't see that it would need any
    other
    access rights to read the ini-file. I have set the access rights on the
    ini-file to
    ALL on all users. I have set the ini-file path to the same as the dll, so
    that
    shouldn't be the problem.


    I have restarted the publishing service but that did not help. Is there no
    way i can get the
    webtier to tell me why it won't load the ini-file?

    You should consider a write to the logfile if the reading of ini-file fail.
    Or am i the only
    one who don't get this working. In my rbserver installation there is a
    Source folder which
    is empty. Does the rbServer come with source? Then i could probably put in
    some code
    myself to se what happens when it attempts to load ini-file.

    I can hardcode the values int the webtier for now, just to make the customer
    happy. But i would really
    like to solve this.

    Please, any other suggestions of what i should try?


    Best regards,
    Terje
  • edited April 2011

    There are no known issues with the ini file feature.

    Here is some simple test code you can try from the WebTier.OnCreate event.
    This code simulates what the webtier is doing. (The WebTier is reading up
    all the values from the ini file, but you get the idea).

    procedure TWebModule1.rsWebTier1Create(Sender: TObject);
    var
    lIniFile: TIniFile;
    lsCacheDirectory: string;
    lsWebCachePath: string;
    lsWebModuleURI: string;
    begin

    if rsWebTier1.IniSettings.Enabled and (rsWebTier1.IniSettings.FileName <>
    '') and FileExists(rsWebTier1.IniSettings.ResolveFileName) then
    begin

    lIniFile := TIniFile.Create(rsWebTier1.IniSettings.ResolveFileName);

    try

    lsCacheDirectory := lIniFile.ReadString('WebTier', 'CacheDirectory',
    lsCacheDirectory);
    lsWebCachePath := lIniFile.ReadString('WebTier', 'WebCachePath',
    lsWebCachePath);
    lsWebModuleURI := lIniFile.ReadString('WebTier', 'WebModuleURI',
    lsWebModuleURI);

    finally
    lIniFile.Free;

    end;
    end;

    end;


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.