#1 2024-10-30 10:33:37

youssef
Member
Registered: 2024-08-05
Posts: 6

Stuck with HTTP.sys registration error in TRestHttpServer

I've been banging my head against the wall for the past few hours trying to get TRestHttpServer working with HTTPS. Every time I try to start the server, it fails with this error:

! OSERR    mormot.rest.http.server.TRestHttpServer(035F7860) http.sys URI registration error #183 for https://+:xxxx/root
! EXC      ERestHttpServer {Message:"TRestHttpServer: http.sys URI registration error #183 for https://+:xxxx/root"}

Here's what I'm trying to do:

MyServer.HttpServer := TRestHttpServer.Create(
  xxxxx,   
  [MyServer], 
  '+', 
  HTTP_DEFAULT_MODE, 
  16, 
  secTLSSelfSigned
);

I'm running the app as admin, and I've tried different ports and using '*' instead of '+' for the binding address, but no luck. The weird thing is that it works fine if I remove the HTTPS stuff, but I really need secure communication for this project.
I've looked through the documentation and searched the forum, but I can't figure out what I'm missing. Is there some special setup needed for HTTP.sys when using self-signed certificates? Or am I doing something completely wrong with the TRestHttpServer creation?

Last edited by youssef (2024-10-30 15:35:29)

Offline

#2 2024-10-30 10:40:47

zen010101
Member
Registered: 2024-06-15
Posts: 70

Re: Stuck with HTTP.sys registration error in TRestHttpServer

You can take a look at these posts first: https://synopse.info/forum/search.php?s … =252481331

Offline

#3 2024-10-30 10:43:13

youssef
Member
Registered: 2024-08-05
Posts: 6

Re: Stuck with HTTP.sys registration error in TRestHttpServer

zen010101 , link doesn't work

Offline

#4 2024-10-30 11:41:03

flydev
Member
From: France
Registered: 2020-11-27
Posts: 73
Website

Re: Stuck with HTTP.sys registration error in TRestHttpServer

@youssef, remove route and add the correct one with https scheme. Your issue seem to be the route is already registered for http.

read this:

link to documentation + windows tool:   
https://synopse.info/forum/viewtopic.ph … 368#p42368

I think @zen010101 is suggesting you this post:
https://synopse.info/forum/viewtopic.ph … 664#p27664

Last edited by flydev (2024-10-30 11:42:16)

Offline

#5 2024-10-30 15:36:33

youssef
Member
Registered: 2024-08-05
Posts: 6

Re: Stuck with HTTP.sys registration error in TRestHttpServer

@flydev thank You smile

Offline

Board footer

Powered by FluxBB