@falcounet I will try that example perhaps I have more luck with that one. Are you running the same firmware or a newer version?
I did manage to get the faul that is occuring:
Sep 07 10:54:39 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[39] Connection id "0HMKGLC886QRH" accepted.
Sep 07 10:54:39 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[1] Connection id "0HMKGLC886QRH" started.
Sep 07 10:54:59 duet3 DuetWebServer[665]: DuetWebServer.Services.ModelObserver[0] New number of custom HTTP endpoints: 0
Sep 07 10:54:59 duet3 sudo[3741]: pam_unix(sudo:session): session closed for user root
Sep 07 10:55:03 duet3 sudo[3813]: pi : TTY=pts/0 ; PWD=/opt/dsf/bin ; USER=root ; COMMAND=./CustomHttpEndpoint
Sep 07 10:55:03 duet3 sudo[3813]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Sep 07 10:55:04 duet3 DuetWebServer[665]: DuetWebServer.Services.ModelObserver[0] New number of custom HTTP endpoints: 1
Sep 07 10:55:04 duet3 DuetWebServer[665]: DuetWebServer.Services.ModelObserver[0] Registered HTTP GET endpoint via /machine/custom-http-endpoint/demo
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets[6] Connection id "0HMKGLC886QRH" received FIN.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[39] Connection id "0HMKGLC886QRI" accepted.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[1] Connection id "0HMKGLC886QRI" started.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[10] Connection id "0HMKGLC886QRH" disconnecting.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets[7] Connection id "0HMKGLC886QRH" sending FIN because: "The client closed the connection."
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://10.0.0.2/machine/custom-http-endpoint/demo - -
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[2] All hosts are allowed.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1000] No candidates found for the request path '/machine/custom-http-endpoint/demo'
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware[2] Request did not match any endpoints
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[2] Connection id "0HMKGLC886QRH" stopped.
Sep 07 10:55:49 duet3 DuetWebServer[665]: DuetWebServer.Authorization.SessionKeyAuthenticationHandler[8] AuthenticationScheme: SessionKey was successfully authenticated.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HMKGLC886QRG", Request id "0HMKGLC886QRG:00000005": An unhandled exception was thrown by the application. System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (13): Permission denied /run/dsf/custom-http-endpoint/demo-GET.sock at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at DuetWebServer.Middleware.HttpEndpointConnection.Connect(String socketPath) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetWebServer/Middleware/HttpEndpointConnection.cs:line 31 at DuetWebServer.Middleware.CustomEndpointMiddleware.InvokeAsync(HttpContext context) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetWebServer/Middleware/CustomEndpointMiddleware.cs:line 97 at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Server.Kestrel.Connections[9] Connection id "0HMKGLC886QRG" completed keep alive response.
Sep 07 10:55:49 duet3 DuetWebServer[665]: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://10.0.0.2/machine/custom-http-endpoint/demo - - - 500 0 - 31.3982ms
So the first thing is strange since it is telling that no endpoint is matched. And then there is a permission error on the unix socket that is created.