Additionally, assume that you bind the SO_REUSEADDR socket to a specific TCP port on the computer. In this situation, when you try to bind the SO_REUSEADDR socket to the TCP port again, the bind fails, and you receive the "WSAEACCES (10013)" error.
Therefore, if you use an application that calls the two binds in Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2, it cannot work correctly.
- By default, Windows Server 2008 R2 cannot use the netsh command to exclude ports. However, after you apply hotfix 2665809, the operating system supports this function.
- This issue does not occur in Windows Server 2008 or Windows Server 2003.
- Use a port that is not included in the default dynamic port range (from 49,152 to 65,535), and do not specify the port as an excluded port by running the netsh command.
- Use the CreatePersistentTcpPortReservation and LookupPersistentTcpPortReservation functions to reserve a port.