RTC Forums
April 29, 2024, 02:17:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Unable to connect remotely  (Read 3176 times)
MickyJ
RTC Expired
*
Posts: 6


« on: January 29, 2013, 11:36:02 AM »

This is just an FYI for those who cannot understand why they can connect to the RTC server locally but all attempts to connect from remote computers fail. Make sure you don't set TRtcHttpServer.ServerAddr:='localhost'

D'oh!  Roll Eyes
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: January 29, 2013, 11:55:19 AM »

Smiley

Other things to note about remote Server access ...

1. Unless you need the Server to listen to a specific Network addapter (only "localhost" or specific Network Addapter IP) wile ignoring connection attempts from any other source, you should leave the ServerAddr property of the TRtcHttpServer component empty. When the ServerAddr property is empty, the TRtcHttpServer will accept connections from all Network addapters.

2. For the Server to be accessible remotely over the Internet, your Internet router has to be configured to forward incoming connections to your Server PC. This usually involves setting up a "Virtual Server" in your router, or using "Port Forwarding" features. Most routers will have the option to choose the external and the internal Port separately. Best practice is to set up your Server to accept connections on the same Port number which you want to use from the Internet and set up that number as internat and external Port for your Server on the router. This option works best on all routers, avoids frustration (if you mix up ports, or the router does not work properly with different internal and external port numbers) and ... it avoids confusion in the future.

3. Some proxy Servers will add the domain name to the request URI, as if they are forwarding the request to another Proxy. This is usually the case when your Server is being accessed from mobile phones. Unless you are writing a Proxy with RTC Server components, if you want your Server to be accessible from as many locations as possible, without having to manually write code inside the OnCheckRequest event to handle requests with a domain and protocol prefix, you should set the "FixupRequest.RemovePrefix" property on the TRtcHttpServer component to TRUE. This way, the TRtcHttpServer component will be checking if the Request URI has a protocol and domain prefix and remove it from the Request.FileName and Request.FilePath properties before calling the OnCheckRequest event.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.