WebTier + ini file

edited August 2009 in Server
Hi
I've got a doubt. If in my ISAPI WebTier component, the INI file
property is set to True, it means that the component reads automatically
the property value from the ini file when it runs or I have to set them
manually reading them from the INI file?. Because I change the
parameters (for example the CacheDirectory or WebCachePath) in the INI
file but the webtier does not use the new values.
thanks

Comments

  • edited August 2009

    From the RBServer Help topic for TrsWebTier.IniSettings...

    "Use IniSettings to enable the web tier to read and write its state from an
    .ini file. If Enabled is set to True, the web tier will load its property
    values from the .ini file specified in FileName. This allows the
    configuration of the web tier to be changed without recompiling - simply
    unload the DLL or Shared Module, and make the changes to the ini file. The
    next time the web server loads the module, the new property values will be
    read from the file."

    Therefore try unloading the ISAPI WebTier module.

    If the new settings are still not used, then perhaps the INI file is not in
    the correct location, as specified by the WebTier.IniSettings.FileName
    property.



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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2009
    Hi
    It still not working.

    My application is set as follow to check if it use the ini file

    WebTier properties:
    CacheDirectory=C:\myWebtier\cache\
    IniSettings
    Enabled=True
    FileName=($Application)\WebTier.ini
    WebCachePath=http://myWebCachePath/WebReport/cache/
    WebModuleURI=http://myWebModuleURI/WebReport/WebTier.dll

    Then in the ini file (WebTier.ini):
    [WebTier]
    CacheDirectory=C:\WebReport\cache\
    WebCachePath=http://localhost/Reportes/cache/
    WebModuleURI=http://localhost/Reportes/WebTier.dll

    finally in the internet explorer:
    http://localhost/webReport/WebTier.dll?content=pdf&volume=Report
    Files&name=Informes\DetalleCajaA&folder=v0d3&zoom=70&newsearch=T&asg0f0se=10&asg0f0sa=false

    The next is what it shows in the adress bar:
    http://mywebcachepath/WebReport/cache/{254BEC4A-FC6F-475D-B681-CE2A073C07D9}/640454/PDF/report.PDF

    So it is not reading the ini file.
    Please could you tell me what I'm doing wrong. If I set the webtier
    properties as in the ini file but manually, it works ok.


    Inisetting is enabled and FileName = ($Application)\WebTier.ini. By
    default in my application the cache directory is set to
    'C:\myReport\cache\'. When I move the application to another directory
    for example c:\MyReports and set ini file cacheDirectory to that
    location (c:\myReports\cache\) the web tier still try to create the
    report in the default location 'C:\WebReport\cache\'.


    Nard Moseley (Digital Metaphors) escribió:
  • edited August 2009
    Hi
    Please I needo to solve that problem. I'm still having the problem. Do
    I have to call any function manually to make the component to read the
    ini file?

    My application is set as follow to check if it uses the ini file

    WebTier properties:
    CacheDirectory=C:\myWebtier\cache\
    IniSettings
    Enabled=True
    FileName=($Application)\WebTier.ini
    WebCachePath=http://myWebCachePath/WebReport/cache/
    WebModuleURI=http://myWebModuleURI/WebReport/WebTier.dll

    Then in the ini file (WebTier.ini):
    [WebTier]
    CacheDirectory=C:\WebReport\cache\
    WebCachePath=http://localhost/Reportes/cache/
    WebModuleURI=http://localhost/Reportes/WebTier.dll

    finally in the internet explorer:
    http://localhost/webReport/WebTier.dll?content=pdf&volume=ReportFiles&name=Informes\DetalleCajaA&folder=v0d3&zoom=70&newsearch=T&asg0f0se=10&asg0f0sa=false

    The next is what it is shown in the adress bar:
    http://mywebcachepath/WebReport/cache/{254BEC4A-FC6F-475D-B681-CE2A073C07D9}/640454/PDF/report.PDF

    where http://mywebcachepath/WebReport/cache is the default webtier
    property instead of http://localhost/Reportes/cache/ in the ini file. So
    it is not reading the ini file.
    Please could you tell me what I'm doing wrong because if I set the
    webtier properties as in the ini file but manually, it works ok.


    Thanks


    Nard Moseley (Digital Metaphors) escribió:
  • edited August 2009

    The WebTier.Loaded method is responsible for loading the ini settings. If
    you place the TraWebTier on the TWebModule then the VCL automatically calls
    Loaded. On the other hand, if you create the WebTier via code, then you will
    need to call it manually.

    If you test with the Demos does it work?


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2009
    The DEMO do the same. I've used ISAPI demo, and only set
    IniSetting.Enable to true. then I created a folder named "reportes" and
    a virtual directory named "rbreportes" pointing this folder. In the ini
    file I've changed the original values created when I compiled the dll of:
    CacheDirectory=C:\rbWebPub\Cache\
    WebCachePath=http://localhost/rbWebPub/Cache/
    WebModuleURI=http://localhost/rbWebPub/Report.dll

    for the new values:
    CacheDirectory=C:\Reportes\Cache\
    WebCachePath=http://localhost/rbReportes/Cache/
    WebModuleURI=http://localhost/rbReportes/Report.dll

    where rbreportes is the virtual directory name. When I call the
    service, for example:

    http://localhost/rbReportes/report.dll?content=pdf&volume=Report&name=Informes\DetalleCajaA&folder=v0d3&zoom=70&newsearch=T&asg0f0se=10&asg0f0sa=false

    instead of creating the report into c:\reportes\cache, it creates the
    report into rbWebPub\cache (what is set in the component) and tries to
    access to that location to read it
    (http://localhost/rbWebPub/Cache/{C87803B7-7576-4859-A17D-74FAE5521B18}/163845/PDF/report.PDF).
    So it returns an error.

    Does the explanation helps?


    Nard Moseley (Digital Metaphors) escribió:
  • edited August 2009
    I performed the exact test you describe and did not encounter any issues. I
    used the exact new values that you specify. The new cache and log directored
    were created and everything worked from the rbReportes virtual directory. I
    used RB 11.05 for my testing.



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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2009
    I'm using RB server 9.03, I'll try with RB 11.05 trial to see if that is
    the problem.
    I'll keep you informed
    Thanks


    Nard Moseley (Digital Metaphors) escribió:
This discussion has been closed.