Jump to content

picyka

uniGUI Subscriber
  • Posts

    1082
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by picyka

  1. 4 minutos atrás, Farshad Mohajeri disse:

    O problema parece ser diferente. O navegador não permite uma conexão não segura no WS se o site principal estiver em HTTPS.

    Parece ser algo que esquecemos. Você precisa configurar um servidor websockets seguro.

    Now that I've seen this message.

  2. 7 minutes ago, Farshad Mohajeri said:

    Problem seems to be different. Browser doesn't allow a non-secure connection on WS if your main site is on HTTPS.

    It seems to be something that we have overlooked. You need to setup a secure websockets server.

    I sent the settings in private, maybe you can tell me what I did wrong thank you for your support.

  3. 2 minutos atrás, Mossy disse:

    Oi

    A versão 1.90.0.1564 está funcionando? Eu não poderia executar nem mesmo os projetos de demonstração após a instalação.

    Relação

    Here it is working normally.

    • Upvote 1
  4. 42 minutes ago, Farshad Mohajeri said:

    There is no need to make settings in your application other than enabling MainModule.WebSocketsConnection.

    Since you are using a different port, binding is not needed to be specified.

    Above settings should work for you.

    Error without any configuration (image Error1)

    Error with settings in serverModule(Image Error2)

    Error1.png

    Error2.png

  5. Em 2/22/2023 às 11:22, picyka disse:

    Bem, estou tentando configurar o WS em um servidor de teste.

    meu cenário atual

    Página HTTPS com CloudFlare

    HyperServer com IIS

    Eu não tenho o certificado SSL (quem faz o site https é cloudFlare)

    Então, basicamente, eu preciso usar websockets http

    Configurações:
     

    MainModule: 
      WebSocketConnection
        Enabled = True
    
    ServerModule
      WebSocketServer:
        AlwaysUseHTTP = True
        AuxPort = 8088
        Binding = my ip server
        Enabled = True	
    	
    hyperserver cfg	
      [websockets]
      enabled=1
      aux_port=8088
      max_queue_length=1000
      binding=my ip server
      global_binding=
      global_port=0
      external_server_url=
      external_server_token=
      always_use_http=1

    perdoe-me por não entender toda a configuração

    Does anyone know how to make it work in version 1565?

  6. Well, I'm trying to setup WS on a test server.

    my current scenario

    HTTPS page with CloudFlare

    HyperServer with IIS

    I don't have the SSL certificate (who makes the site https is cloudFlare)

    So basically I need to use http websockets

    Settings:
     

    MainModule: 
      WebSocketConnection
        Enabled = True
    
    ServerModule
      WebSocketServer:
        AlwaysUseHTTP = True
        AuxPort = 8088
        Binding = my ip server
        Enabled = True	
    	
    hyperserver cfg	
      [websockets]
      enabled=1
      aux_port=8088
      max_queue_length=1000
      binding=my ip server
      global_binding=
      global_port=0
      external_server_url=
      external_server_token=
      always_use_http=1

    forgive me for not understanding the whole configuration

  7. AlwaysUseHTTP = True
    http://unigui.com/doc/online_help/websockets--ssl.htm

    If web page uses 
    https then wss will be used for WebSocket connection. This behavior can be overrode by setting AlwaysUseHTTP property to True. In this case WebSockets will use a non-secure connection regardless of the web page.

    I'm studying the WS, it will suggest several doubts, some may be childish. If my page is https, and I want to use WS as http by checking the AlwaysUseHTTP option, would that be allowed?


     

  8. 6 minutos atrás, cdev disse:

    Olá

    Eu tenho um aplicativo UniGUI com um loginform com credenciais de nome de usuário/senha.

    Agora, eu gostaria de torná-lo possível, como acontece com a maioria dos aplicativos da web, quando você clica em um botão 'Esqueceu a senha', você pode inserir seu endereço de e-mail, você recebe um e-mail com um link e uma vez que você clica nesse link, você pode definir uma nova senha.

    Alguém tem ideia de como eu poderia fazer isso? Eu acho que eu tenho que gerar um identificador exclusivo como link e enviar isso para o usuário. Isso não deve ser problema, mas como faço para enviar esse identificador exclusivo de volta para o aplicativo UniGUI para verificar se está OK para definir a nova senha? Com parâmetros? É assim ou existe uma maneira melhor?

    You can ask for his email, when you click send,
    you can trigger an email with a temporary password. When he logs in, you force him to change the password.

  9. 2 minutos atrás, awendisch disse:

     

    Estou tentando criar um método para chamar uma máscara de tela, executar um código e, finalmente, ocultar a máscara. Meu objetivo é usar esse código em todo o meu sistema, como sempre que eu precisasse eu apenas chamá-lo de uma biblioteca.

    try
      ShowMask ('any text'));
      UniSession.Synchronize;
      .....
      Reading data
      .....
    finally
      HideMask;
    end;

     

    • Thanks 1
  10. If Remote Query is True then Selected[0] doesn't work.

    I will need that, when starting a screen, I can put some values, however, when activating the field the OnRemoteQuery must be executed.

     

    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      UniCheckComboBox1.Items.Add('1 - Teste 1');
      UniCheckComboBox1.Items.Add('2 - Teste 2');
      UniCheckComboBox1.Items.Add('3 - Teste 3');
      UniCheckComboBox1.Selected[0] := True;
      UniCheckComboBox1.RemoteQuery := True; {If you put False, it works}
    end;

     

  11. 2 hours ago, Abaksoft said:

    Obrigado Picika,

    Como funciona ?

    Eu tentei, mas nenhum alerta. Você pode enviar um exemplo.

    THX

      
      
         
         
         
         
         
         
         
         
         
         
         
         
        
     
      
    
      

     

    It serves to get the position of the cell phone's gps

  12. procedure TUnimFormMeuAtendimento.ExecuteLocalizacao(Botao : String);
    begin
      UniSession.AddJS(
        'if (navigator.geolocation) { ' +
        '  navigator.geolocation.getCurrentPosition( function(position) { ' +
        '    ajaxRequest(UnimFormMeuAtendimento.'+Botao+', "CurrentPosition" ,' +
        '      ["lat=" + position.coords.latitude, ' +
        '       "lng=" + position.coords.longitude, ' +
        '       "acc=" + position.coords.accuracy, ' +
        '       "alt=" + position.coords.altitude, ' +
        '       "altacc=" + position.coords.altitudeAccuracy, ' +
        '       "head=" + position.coords.heading, ' +
        '       "ts=" + position.coords.timestamp ' +
        '      ]);' +
        '    })' +
        '} else {alert("Localização não suportada!");}');
    end;

     

×
×
  • Create New...