Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mo 17.05.21 07:15 
Moin Forum,

ich möchte ein Formular über das Web erreichbar machen und dem Benutzer die Möglichkeit eines Logins geben.
Ich rede hier über 4-5 Benutzer die die Möglichkeit erhalten sollen ein paar Messwerte eingeben zu können.
Bräuchte einen kleinen Anstoß wie man das ohne all zu großen Aufwand umsetzen kann.

Danke und Gruß,
Oliver

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 17.05.21 17:17 
Wovon reden wir?
Von einem Anwendungsserver, der die Daten dann auch weiterverarbeitet?
Oder von einer Webseite, die die Daten in eine Datenbank einträgt, die dann jemand ausliest?
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Di 18.05.21 07:38 
Ich möchte eine Anwendung auf einem normalen Windows-PC laufen lassen und ein paar Eingaben sollen aus der Ferne per Webseite dort eingetragen werden können.

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 18.05.21 09:55 
Dann benötigst du einen HTTP(S) Server.
Entweder du erstellst eine Webanwendung für einen Webserver (IIS, Apache/XAMP) oder aber du entwickelst eine Anwendung mit einem integrierten HTTP(S) Server (bei Indy ist dort eine entsprechende Komponente namens TIdHTTPServer vorhanden, s. z.B. Creating a simple HTTP Server oder Indy 10 Beispiele).
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 18.05.21 11:22 
Kannst du JavaScript usw.?
Wenn nicht, würde ich TMS Web Core vorschlagen. Damit kannst du die Webseite mit Delphi schreiben und hast sicher schneller gute Ergebnisse als mit HTML und JavaScript, wenn du dich erst einarbeiten musst.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 19.05.21 09:17 
Ok, habe mir mal ein paar Dinge angesehen. Ich denke TWebModule ist das was ich brauche.
In
TWebModule1.WebModule1DefaultHandlerAction
kann ich HTML übergeben und es mir in einem Browser ansehen.

Mit
ausblenden HTML-Dokument
1:
    <p><input tabindex="3" style="HEIGHT: 24px; WIDTH: 142px" alt="Alt Text" type="submit" value="OK" name="myButton"></p>					
kann ich einen Button anzeigen, aber wie kann ich dem Button eine Aktion zuweisen die in meiner Anwendung etwas ausführen soll?

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mi 19.05.21 09:59 
Ich hoffe, du kannst englisch - lies dir mal The WebBroker: CGI and ISAPI durch (bes. ab "TWebModule", d.h. das Benutzen der TWebActionItems und des OnAction-Ereignisses, den Unterschied zwischen POST und GET sowie das "IntraBob"-Beispiel).
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 19.05.21 15:11 
Das brachte schon mal viel Licht ins dunkel, danke! :-)
Bevor ich loslege muss ich noch verstehen wie ich alles über https übertragen kann statt http.

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 20.05.21 10:50 
Bei einem Apache-ISAPI-Modul sollte es genügen das im Apache zu konfigurieren.
jfheins
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 918
Erhaltene Danke: 158

Win 10
VS 2013, VS2015
BeitragVerfasst: Fr 21.05.21 19:06 
Würde da ein simples Google Form reichen?

Ergebnisse werden automatisch in eine Tabelle eingetragen.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Di 25.05.21 13:17 
Also... nachdem ich etliche Webseiten dazu gefunden und gelesen habe...
Zertifikat erstellt:
ausblenden Delphi-Quelltext
1:
openssl req -new -days 999 -newkey rsa:4096bits -sha512 -x509 -nodes -out server.crt -keyout server.key					


in meiner Anwendung:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
  IdServerIOHandlerSSLOpenSSL1.SSLOptions.CertFile     := 'server.crt';
  IdServerIOHandlerSSLOpenSSL1.SSLOptions.KeyFile      := 'server.key';

  IdHTTPServer1.IOHandler           := IdServerIOHandlerSSLOpenSSL1;
  IdHTTPServer1.DefaultPort         := 443;
  IdHTTPServer1.OnCommandGet        := IdHTTPServer1CommandGet;
  IdHTTPServer1.OnCommandOther      := IdHTTPServer1CommandOther;
  IdHTTPServer1.OnStatus            := IdHTTPServer1Status;
  IdHTTPServer1.Active              := True;

Sobald ich die URL "https://localhost/" aufrufe bekomme ich die Fehlermeldung:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
Erste Gelegenheit für Exception bei $768546D2. Exception-Klasse EIdOSSLUnderlyingCryptoError mit Meldung
'Fehler beim Annehmen der Verbindung mit SSL.
error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown'
.
Prozess WebserverTestIndyHTTP.exe (10204)


Was läuft denn da falsch?

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 26.05.21 10:51 
Hat niemand eine Idee?
Irgendwo ein Tutorial zu dem Thema? Ich denke ich habe mittlerweile das halbe Internet durch und zig Sachen ausprobiert.

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Sinspin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1321
Erhaltene Danke: 117

Win 10
RIO, CE, Lazarus
BeitragVerfasst: Mi 26.05.21 14:53 
Hallo, schon versucht die Pfade vollständig anzugeben?
ausblenden Delphi-Quelltext
1:
2:
IdServerIOHandlerSSLOpenSSL1.SSLOptions.CertFile     := 'server.crt';
IdServerIOHandlerSSLOpenSSL1.SSLOptions.KeyFile      := 'server.key';

_________________
Wir zerstören die Natur und Wälder der Erde. Wir töten wilde Tiere für Trophäen. Wir produzieren Lebewesen als Massenware um sie nach wenigen Monaten zu töten. Warum sollte unser aller Mutter, die Natur, nicht die gleichen Rechte haben?
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 27.05.21 07:40 
Jetzt gehts... habe einen Fehler gesucht der gar nicht da war...
Im Debugger kommt zwar die Fehlermeldung dass das Zertifikat unbekannt ist... aber das kommt weil der Browser (Edge) scheinbar dass Zertifikat irgendwo prüft. Ist ja ein selbstsigniertes. Wenn ich das Prog außerhalb der IDE starte kommt auch die Fehlermeldung nicht. Dann einfach im Browser auf "Nicht sicher, trotzdem weiter" und es funktioniert.
Viele Dank für Eure Unterstützung.
Gruß Oliver

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...