""An attempt was made to access a socket in a way forbidden by its access permissions" error?

Added by Osman Zakir about 1 year ago

I tried to test my app (it's not completely done yet, but it should at least be able to do the bare minimum of what it needs to do (displaying a map with an info window that has a form on it). But I got the following error when I tried to run it:

[2017-Nov-09 03:25:44.217] 7420 - [warning] "wthttp: Error occurred when binding to 0.0.0.0:80
An attempt was made to access a socket in a way forbidden by its access permissions."


Replies (4)

RE: ""An attempt was made to access a socket in a way forbidden by its access permissions" error? - Added by Roel Standaert about 1 year ago

Hi,

"An attempt was made to access a socket in a way forbidden by its access permissions." is a system-specific error, not one generated by Wt. It seems that this is a Windows-specific error?

The error suggests that you are not allowed to bind to 0.0.0.0 (all IPv4 interfaces) on port 80, because it is blocked somehow. Maybe it's already in use by another application that has exclusive access, e.g. another web server, or there is some other application (antivirus, firewall,...) blocking it?

Regards,
Roel

RE: ""An attempt was made to access a socket in a way forbidden by its access permissions" error? - Added by Osman Zakir about 1 year ago

I'm using an Administrator account on my Windows machine. I'll have to check and make sure there isn't already another web server using port 80 or some other application blocking it.

I tried to use the Cpprestsdk HTTP client since I don't really get how to use Wt's one. That couldn't be the reason for the error, right?

RE: ""An attempt was made to access a socket in a way forbidden by its access permissions" error? - Added by Osman Zakir about 1 year ago

Okay, "System" (PID 4) was listening on port 80 using TCP. I stopped the W3SVC service and now nothing's listening on port 80.

(1-4/4)