Jump to content

Wilton Ergon

uniGUI Subscriber
  • Posts

    626
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by Wilton Ergon

  1. I think you want to create something complicated, into something that can be quite simple to solve.

    when you call your helper apps, pass the url, the login parameters, and also add a datetime parameter.

    when the helper app is loaded, you test if the datetime parameter, is greater than the current time, and accept a 1 minute interval.

    from this the url will only be valid at that moment.
    Of course, pass this information in the url in an encrypted way.

    unigui itself uses this technique, for url redirection in hyperserver

     

    even if your idea is possible

    as you suggested, it is very likely that your client will not be able to open 2 different auxiliary programs at the same time, as it is not possible to use the same session for 2 different programs.

    ex:
    Login
       run app1
       run app2

    the user cannot have app1 and app2 open at the same time.

  2. @Farshad Mohajeriyou have been following my case..

    server master url
    gepweb.mydomain.com


    url slave1

    gepweb01.mydomain.com

    url slave2
    gepweb02.mydomain.com

    I'm using the url redirect feature in hyperserver


    cookies are saved based on the site url, 
    so when you save the cookie to slave1, it is not retrieved on slave2

     

     

    in some places I could replace cookies with information recorded in the database,

    but on the login screen I need to retrieve information before connecting to the database.

  3. 22 minutes ago, Sherzod said:

    Hello,

    You can try replacing with:

    window.IDLE_TIMEOUT = 1800;
    window._idleSecondsCounter = 0;

    And then change the values when you need it...

    after this change in variable declaration my main form is no longer displayed

  4. I have a script in the main form, and I need to change it at runtime, because the value of a variable is defined by a parameter, I tried to make this change in the create of the main form, but there was no effect

     

    procedure TFrmPrincipal.UniFormCreate(Sender: TObject);
    var tempoTimeOut:integer;
    begin
     tempoTimeOut := i'm getparameter.....
     if tempoTimeOut>0 then
        self.script.Text :=StringReplace(script.Text,'var IDLE_TIMEOUT = 1800;','var IDLE_TIMEOUT = '+inttostr(tempoTimeOut*60)+';',[rfIgnoreCase,rfReplaceAll]);

     

    my script... in form create, change var IDLE_TIMEOUT

    var IDLE_TIMEOUT = 1800;
    var _idleSecondsCounter = 0;
    document.onclick = function() {
        _idleSecondsCounter = 0;
    };
    document.onmousemove = function() {
        _idleSecondsCounter = 0;
    };
    document.onkeypress = function() {
        _idleSecondsCounter = 0;
    };
    window.setInterval(CheckIdleTime, 1000);

    function CheckIdleTime() {
        _idleSecondsCounter++;
        var oPanel = document.getElementById("SecondsUntilExpire");
        if (oPanel)
            oPanel.innerHTML = (IDLE_TIMEOUT - _idleSecondsCounter) + "";
        if (_idleSecondsCounter >= IDLE_TIMEOUT) {
            ajaxRequest(FrmPrincipal.form, '_idle_timeout', []);
        }
    }
     

     

    the objective, and that it is possible to configure the application timeout time

     

     

     

     

  5.  

    this chrome option, do an analysis on the site, and one of the points that caught my attention was also referring to the jquery libraries, which are outdated, and have critical vulnerabilities, it would be great if unigui already came with these latest libraries .

     

    image.thumb.png.3dc947178025076b55ce334f0d2d1f55.png

    • Like 2
    • Upvote 2
  6. the use of url redirection generates problems with the use of cookies, if you use a lot to store information in cookies, you will have a problem if you use this feature.

    as cookies are stored depending on the server address, every time you connect, a new url is loaded from another server, so it is not possible to retrieve the last saved value.

    @farahad what do you suggest as an alternative to this situation?

  7. my 2 cents contribution.

    image.thumb.png.e7a844da22380cffe29f6a21f6c3b4f9.png

    when accessing the main address, the redirection is done, and some parameters are added to the url

    the first parameter indicates the date and time that the site was loaded, this link has a useful life of 5 minutes, that means that if it is copied, it cannot be used after that time.

    -----------------------------------------

    image.thumb.png.976cb078e8bcb4a5dffd2e48da9b3905.png

     

    if after 5 minutes, the user decides to refresh the browser, a new connection will be made directly to the slave server, the time has already been exceeded, and with that the website will not be loaded.

    ----------------------------------------

    image.thumb.png.74652dcd2397056a8702fb71fde24f19.png

    I still haven't found a place to set a custom html for that page.
    when clicking on the restart application link, it redirects to the main server, which in turn redirects to one of the slave servers.

    if the application is already able to mount the link from the main server, in my understanding, this redirection should be automatic, if the site is loaded using a url with a timeout, it already does the redirection, if that is not possible, at least we can create a more user-friendly screen, my users panic, with messages in English.

    ----------------------------

     

    image.png.7691831547f6acdfb4d71cf6f146aadb.png

    if the user tries to directly access a slave server, he without the url parameters, he displays a server unavailable message, I believe that if he is able to display this message, he might be able to already do automatic redirection to the main server, which in turn would forward to one of the slave servers.


    here at this point I understand that if this slave server is down, a browser error will be generated, this is acceptable.

    Of course, if this is not possible, at least we can configure our message to our user as clearly as possible, a message like this will always generate support calls.

     

    -----------------------------
    our friend @farahadis already aware of this, I'm just posting it here, so everyone can follow the evolution of this amazing new feature

     

     

     

    • Thanks 1
  8. 1 minute ago, Farshad Mohajeri said:

    Como você está usando uma URL segura (https) em seu slave, você deve copiar SSL DDLs para a pasta master conforme indicado em nossos documentos.

     

    my certificate is installed and configured in IIS,

    image.png.1a58512db152196bac81b92a44da445f.png

     

     

    in the manual it says a folder that does not exist

    image.thumb.png.206cacb59024cd6f9eaee90a3146243d.png

    would these files be?

     

    image.png.f0b99ff6af83e37cbe0d7ff7ad8695c1.png

     

  9. 6 hours ago, Farshad Mohajeri said:

    Quais são essas dúvidas?

    I tried yesterday to change to mode 2 without success, I updated the version and kept the mode 0.


    my previous configuration is like this:

    master server

    gepweb_d.dll (hyperserver dll) configured in IIS
    gepweb_d.cfg
    contains the list of slave servers.
    using in the url field only the iplocal
    ex:

    [server-0]
    enabled=1
    url=http://10.32.128.147:8077
    name=APP1
    token=ydhtkz211022170003821

    on slave servers I have

    there I have the hyper_service.exe (service running on windows)
    hyper_service.cfg that contains the settings with their respective token (same as the master server)


    basically on main server, configuration in IIS

     

    needed to keep my environment working, I still kept the previous configuration.

    image.png.0721cc78beb737e7db0277d267c01a1d.png

     

     

     

    I had reported this problem, and it is in the log that it had been fixed, but it still continues.

    image.thumb.png.f4056ef32328bb80a2a62f1f651ad8b7.png

     

     

    on slave servers, hyper_service service running
    ---------------

    now, I create a public url for each slave server, so that it is used on the master server, in the global_url field

    [server-0]
    enabled=1
    url=http://10.32.128.147:8077
    name=APP1
    token=xxxxxxxxxxxx
    global_url=https://gepweb01.mydomain.com.br/gepweb_d.dll  
    cluster_mode=2
    avoid_direct_access=1
    url_timeout_secs=300


    in this case on the slave server, I configured my application in IIS, so that it is publicly visible.
    I believe that is what is wrong.

    when I access the address gepweb.mydomain.com.br

    it does the wrong redirect and does not load the application


    on the slave servers will I still keep the same operation, just running the hyperserver service?


     

  10. I updated the version, recompiled my project, and it doesn't start anymore,
    It doesn't show anything in the log.
    only that

    GepWeb_E.exe: 000005AC: 11:18:37 [TUniServerModule]:Server First Init.
    GepWeb_E.exe: 000005AC: 11:18:37 [TUniServerModule]:Start Path = C:\GEPWEB\PREFEITURATESTE\
    GepWeb_E.exe: 000005AC: 11:18:48 [Terminated]:Exit Code: 1

    local test,  using  localhost:8077  in debug mode or realese mode

    I enabled all log options, to display more details, but to no avail.
    old  version 1552

    delphi 10.4

    the executable starts, and immediately ends

     

    I removed all the custom css, custometa in the servermodule, and it still doesn't load anything

     

    image.png.8642e2c9dffff8f15de8f0c59e43e927.png

  11. 5 hours ago, Tokay said:

    BTW Poderia ser usado algum conjunto de dados de memória, não o banco de dados real.

    exactly what I do here, I roll the dice and a TVirtualTable, and generate the content of the columns using HTML

×
×
  • Create New...