error WSAEACCESS on socket connect RRS feed

  • Question

  • I am using WinHTTP in a DHCP callout DLL (DHCP Server Callout API). The code works fine in test but in the actual DHCP server environment I get ERROR_WINHTTP_CANNOT_CONNECT (12029) which I traced back to WSAEACCES (10013) which I traced back to status code 0xC0000022 (access denied). I confirmed this by writing a simple piece of sockets code: call socket(AF_INET,SOCK_STREAM,IPPROTO_TCP), call connect( - connect() fails with WSAEACCESS. There is a server at and the call works when I run it in my account.

    The server is a standalone (not joined to a domain) 2008R2 in an ESX VM. There are two network interfaces: one connected to the real network (10.*), the other connected to an empty network (192.168.*) with no other machines. The DHCP server is only bound to the empty network (192.168.*). IPV6 is installed but unbound from both network interfaces.

    I used Procmon and the only error was a failed attempt to open registry sockets key with full access immediately followed with a successful open with read-only access.

    I ran the DHCP server service in the Local System account to check of this is permissions-related. The problem is still there.

    Where do i look next?

    • Moved by Jesse Jiang Monday, June 13, 2011 3:02 AM (From:Visual C++ General)
    Thursday, June 9, 2011 9:46 PM

All replies

  • Hello,


    I think your issue should be raised in the Winsock Kernel (WSK). I believe they will know more information of this issue than us, and I will move this one to that forum.


    Thanks for your understanding,


    Best regards,



    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 13, 2011 3:02 AM
  • Thanks guys. The question really boils down to: "why does winsock generate WSAEACCESS".

    Monday, June 13, 2011 1:00 PM