Winsock Error Codes - Brought to you by Winsock-Error.com

10049 "Cannot assign requested address."

WSAEADDRNOTAVAIL (Winsock error number: 10049)

Microsoft say this about Winsock error 10049 - WSAEADDRNOTAVAIL:

The requested address is not valid in its context. This normally results from an attempt to bind to an address that is not valid for the local computer. This can also result from connect, sendto, WSAConnect, WSAJoinLeaf, or WSASendTo when the remote address or port is not valid for a remote computer (for example, address or port 0).

Full details of Winsock TCP error 10049 - WSAEADDRNOTAVAIL:

Berkeley description: Normally results from an attempt to create a socket with an address not on this machine.

WinSock description: Partly the same as Berkeley. The "address" it refers to is the remote socket name (protocol, port and address). This error occurs when the sin_port value is zero in a sockaddr_in structure for or.

In Berkeley, this error also occurs when you are trying to name the local socket (assign local address and port number) with bind(), but Windows Sockets doesn't ascribe this error to bind(), for some unknown reason.

   
This page is designed to help you to understand Winsock TCP error 10049. It will not necessarily mean you can instantly fix issues when your computer tells you that Winsock is having problems with code 10049, rather it will give you the necessary background information to help solve the matter.

Programming declarations for 10049 (WSAEADDRNOTAVAIL):

C#
long WSAEADDRNOTAVAIL = 10049 ;

VB.net
Dim WSAEADDRNOTAVAIL As Long = 10049

VB6
Dim WSAEADDRNOTAVAIL As Long
WSAEADDRNOTAVAIL = 10049