ATL Server and IIS 7/Vista IPv6 RRS feed

  • Question

  • User241804865 posted


    I have an ISAPI extension based on ATL server.  When I issue a request against the application on Vista like this:




    the request hangs. 


    On a hunch, I thought that this might be related to Vista/IIS7's IPv6 support, so I edited the C:\Windows\System32\drivers\etc\hosts file and defined 'localhost' as  I also had to comment out the ::1 line, as I read elsewhere that Vista prefers IPv6 to IPv4 if both are defined:


       # ::1             localhost   


    Lo and behold, the application ran fine.  It also ran fine before this change if I requested rather than http://localhost.


    I haven't yet delved into the guts of ATL Server to see what's upsetting it, but before I do, I figured I'd ask if this is a known problem and may have been addressed in a possible ATL server update in Visual Studio 2008.


    Thanks in advance...


    --- Uwe

    Wednesday, September 19, 2007 3:58 PM

All replies

  • User-75227868 posted

    This is definitely not a problem with ATL nor with your ISAPI extension.

    The <--> localhost mapping is supposed to be there in the hosts file. That is the way your machine resolves the name "localhost" to a real IP (

    Wednesday, September 19, 2007 4:25 PM
  • User241804865 posted

    Thanks for replying.  The problem isn't the mapping of localhost to; the problem is the mapping of localhost to ::1, which I gather is the IPv6 loopback address.

    I just checked the hosts file on a virgin Vista Business machine, and after the comments, it contains two lines:    localhost
    ::1              localhost

    My understanding is that, for conflicts, Vista prefers IPv6 over IPv4, so unless the second 'hosts' line above is commented out, http://localhost/myapp/default.srf resolves to http://::1/myapp/default.srf and that causes my ATL server-based application to hang if invoked from the same machine. 

    So my assumption is that there is some difference in the ISAPI interface when it's called using an IPv6 address, rather than an IPv4 address.  I can't imagine why else it would hang.

    In any case, if this isn't a known problem, I'll see if I can figure it out.  It would still be nice to know if there will be an updated ATL server.

    --- Uwe

    Wednesday, September 19, 2007 4:49 PM
  • User-1670440346 posted

    You may have to specifically target Windows Vista when building your projects...

    for example, most of the atl server project files automatically generated in VC++.net #define windows nt 4.0, which is incompatible with some of the newer Winsock.h files...

    All of my atl server apps run fine on windows server 2008.


    Wednesday, March 12, 2008 7:17 PM