NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: CaseyR on October 14, 2012, 02:23:47 PM

Title: Administrator option to force SSL
Post by: CaseyR on October 14, 2012, 02:23:47 PM
Hi,

I have a web server app that has both the WebServer and SecureServer objects.  I would like to give administrators the option of forcing users to connect with SSL.  The redirect works fine when I provide the port number in the template, but there is a problem when trying to use a setting saved in a table.    The problem is the redirect property is set before the tables are opened and the settings record retrieved.  Setting the property with an embed afterwards has not worked.

Here is the embed code:

    IF WST:UseSSL = TRUE   
      ThisWebServer._RedirectToHttpsPort = WST:SSLPort
    END

I have tried placing the code at the !Start of "NetTalk Object Before Init Section"  and at the  !Start of "NetTalk Object After s_web assigned"  without success.

Assuming the property is correct,  is there an embed point after the tables have been opened that will work?  Or should I just open the table and retrieve the record manually before the property is set by the template code?

Using NT 6.44

Thanks
Title: Re: Administrator option to force SSL
Post by: kevin plummer on October 14, 2012, 02:28:37 PM
I use a global and ini file so I can just edit the ini file to change the value depending on the site.
Title: Re: Administrator option to force SSL
Post by: CaseyR on October 14, 2012, 03:34:08 PM
Thanks for the suggestion, Kevin.

This setting is one of many options administrators have so I am trying to store them in one place with one form for editing.