For reasons I won’t go into here, I am trying to get a Xojo stand alone Web App to listen on port 80. This is on Windows 2008 Server. When I try to start up Xojo the command window opens up then immediately closes. We have turned off IIS and I do not think any other app on this box is running a web server.
I have read some of the documentaionn regarding using port 80. I see that Mac OS and Linux have issues with assigneing port 80 which require Admin privileges. No mention of windows OS. I have tried starting the web app with Admin priviledges, but the same thing happens,
Is it possible to have a Xojo Web App listening on port 80. The goal here is to have any incoming request go by default to port 80. Trying to get port forwarding working on the temporary router we are trying to use has for some reason has been a lesson in futility. So using port 80 seems to me to be a viable solution.
firewall maybe that stops the app from being able to listen on port 80 ?
system restrictions are really the only reason it isnt work (even on macOS and Linux)
I would start first with trying to see if the app works fine on your system, listening to 8080, or something like that.
Then when you are certain it works just fine, you may try port 80. But I vaguely remember these ports are usually unaccessible.
The easiest solution is to employ an index.html page which contains a redirection to the Xojo app.
The big advantage of an index.html page is that you can stuff it with keywords destined to be index by search engines bots.
There are other redirects, such as those described here:
From an elevated command prompt issue a:
netstat -ban | more
and if anything is listening on port 80 it will show that it is in use and the name of the process that is listening on 80
A Xojo web application is based on the service template. I would suggest creating a service to run your web app and use IIS routing & redirect to forward requests from port 80 to whatever you choose.
Have a look at movie
@Anthony Mott I Ran netstat. I see sinething is listentning on port 80 but it says “Can not obtain ownership information”. Any suggestions?
Make sure you are running as an administrator
Type cmd in the search bar
When the search results show up youll see Command Prompt
Right-click the Command Prompt and select Run as Administrator
Run the command as before
I am running as administrator…
Running as a user that has administrator privileges isnt the same as launching the app using the Run as Administrator option which elevates the app permissions itself. Try that.
Either way, this is the only way i know. If you still arent able to see the process owner youll need to download a utility that can identify it.
One other thing to try:
Enable telnet client in Programs and Features and try from a command prompt:
telnet 127.0.0.1 80
Then type get and hit enter
That may give you the output with the name of the listening process
try cmd as admin and netstat -a -b or netstat -?
if the port is in use you will see the exe name.
OK, I opened cmd.exe as admin. I get the same thing. Nearly all of the of the active connections display the exe names. A few including the one listening on port 80 sayts “Can not obtain ownership information” instead of the .exe name…
I tried -a -b and found the the line that says TCP [::]:80 and where the exe should it says the same thing… “Can not obtain ownership information”
I tried the Telnet suggestion. I get
[quote]HTTP/1.1 400 Bad Request
Content:-Type: text/html: charset=us-ascii
Date: Sun, 13 Oct 2019 08:45:08 GMT
Followed by the head html which is returning Request - Invalid Verb
Any other suggestions?
Run this from your “Run as administrator” cmd prompt
netstat -oan | findstr ":80" | findstr "LISTENING"
If you see this (as I do)
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
TCP [::]:80 [::]:0 LISTENING 4
Then IIS is still running.
If you see a vastly different number at the end (where I see 4) then type that number into the following (where xyz is shown)
tasklist | findstr "xyz"
This will find the program that has the PID which owns the open port 80 from above. Find that on your system, shut it down and find out how to stop it automatically running next reboot.
Now, if its IIS, you can shut it down (until net reboot) by typing
net stop w3svc
Now try the first line from above and see if it shows nothing. Your app should now be able to bind to port 80.
If you want to stop IIS from starting after you reboot, open Services (services.msc), find World Wide Web Publishing Service in the list, right click it and select properties, then change the startup type drop down from Automatic to Manual.
It could be one of several services:
IIS (World Wide Web Publishing Service)
SQL Reporting Services
Web Deployment Agent Services
In any case, as Julian said, you need to stop and disable the offending service. To do that, go to the services control panel (run services.msc from a command prompt or the search bar) and look for one of those listed above. If you find something that looks suspicious, right-click on it and select stop and then run “netstat -ban” again and see if port 80 is still bound. If not, go back to services.msc and double-click the service that you stopped to edit it and change the startup mode to “Disabled”. If that wasn’t the one just right-click and restart it.
you can’t use other port?
the start url would be http://domain.com:81 or http://ip:81
your app run in intranet?
@Markus Rauch no we cannot use our normal 8881 port due to a misbehaving router. Trying to work around the issue until we can get the router replaced
@JulianS looks just like yours. Do I have to do anything else besides stopping IIS under “Actions” in IIS? I get 4 with IIS started or stopped.
In that case try net stop http
Got 80 working. Thanks all who helped. I learned a lot in the process. net stop http fixed it.