hat wer Erfahrung mit dem HttpEndpoint ?
Habe das Problem das nach dem ausliefern einer html seite ein Fatal Error Auftritt und sich die exe beendet.
Tritt aber wohl nur bei meinem Pc auf auch Bei Deaktivierter Firewall/Virenscanner.
Mit anderen Programmiersprachen Läuft es wie es soll nur Xbase Macht da wohl was anders
Dank im Voraus
xpp Version: 2.00.1113 - Aktuelle
Log:
Code:FATAL ERROR LOG
No continue after this Error!
SYS Thread-ID: 2096
Module: EXE
Error Codes: EH: 10 Sub: 0(0) OS: 0 XPP: 0
Call Stack of Thread 1 (1020):
MAIN(41)
Call Stack of GUI Thread (1196):
Call Stack of Thread 3 (1972):
@HTTPENDPOINT@I@CONNECTED(436)
@HTTPENDPOINT@I@LISTEN(392)
@LISTENERTHREAD@I@EXECUTE(119)
Call Stack of Thread 4 (2032):
Call Stack of Thread 5 (2096):
@APPSTORAGEMANAGER@I@OPENORCREATE(198)
@APPSTORAGEMANAGER@I@START(173)
@CXPAPPLICATION@I@STARTUP(1910)
@ABSTRACTHOSTADAPTOR@I@STARTUP(164)
@WEBJOB@I@EXECUTEWEBREQUEST(570)
@WEBJOB@I@EXECUTEHTTP(528)
@WEBJOB@I@EXECUTE(484)
File: D:\Workspace\xbase\web_service\web_server.exe
TimeStamp: 20200121 08:50
End of FATAL ERROR LOG.
Project File:// This example creates an html file in the current directory.
// The HttpEndpoint loads the file and returns it to the
// connected client on request. If an SSL certificate is
// installed on the computer, the end point is bound to this
// certificate in order to allow clients to connect via SSL
// for increased security.
#include "inkey.ch"
#include "web.ch"
#define PORT 81
PROCEDURE Main()
LOCAL cPort
LOCAL oHttpEndpoint
LOCAL nKey
LOCAL cHtml
LOCAL lStarted
//
// Creates a sample html file on the local drive.
//
IF .NOT. File( "default.html" )
cHtml := ""
cHtml += "<h1>Hello World!</h1>"
cHtml += "<h2>Greetings from: "+AppName()+"</h2>"
MemoWrit( "default.html", cHtml )
ENDIF
cPort := Var2Char(PORT)
? "HttpEndpoint sample."
?
? "With a web browser navigate to:"
?
? " http://localhost:"+cPort+"/default.html"
?
? "Press ESC to quit"
//
// Create an end point for handling incoming
// connections on the specified port
//
// Note: Requests to .html files are handled
// automatically by the Http end point!
// No code must be written for returning
// the sample .html file.
//
oHttpEndpoint := HttpEndpoint():new( PORT, "localhost" )
lStarted := oHttpEndpoint:start()
IF .NOT. lStarted
? "Startup error. Check if port "+cPort+" is already in use."
WAIT
RETURN
ENDIF
// Continue after the ESC key was pressed
nKey := 0
DO WHILE nKey <> K_ESC
nKey := Inkey(1)
ENDDO
//
// Stop the endpoint before the application
// terminates
//
oHttpEndpoint:stop()
RETURN
//
// Project - Definition - File created by PBUILD Version 2.00.1150
// Date: 10.01.2020 Time: 08:51:31
//
[PROJECT]
VERSION = 2.2
PBUILD = @project.txt
MAKE =
project.xpj
[project.xpj]
web_server.exe
[web_server.exe]
COMPILE = xpp
COMPILE_FLAGS = /q /ga
DEBUG = yes
GUI = yes
LINKER = alink
LINK_FLAGS =
RC_COMPILE = arc
RC_FLAGS =
INTERMEDIATE_DEBUG = .debug
INTERMEDIATE_RELEASE = .release
web_server.prg