I see that many people get this error, but their situations all appear a little different from mine.
I have a ASP.NET 4.0 web app that runs in IIS 6.0 on a Windows 2003 Server.
When I Remote to the web server box and log on there and access the site as localhost rather than by machine name, the web app works fine. However, when I access the web site from another client machine, I get the following error:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
The web site has Anonymous access turned Windows Authentication turned on. The web app contains the following:
<authentication mode="Windows"> </authentication>
<identity impersonate="true"/>
<connectionStrings>
<add name="MyConnection" connectionString="Data Source=MyDbServer;Initial Catalog=MyDatabase;Integrated Security=True"
</connectionStrings>
My web server is running on a Virtual Server. Is this relevant? I assume not.
Note that if I add my domain\login and password in the web config after Impersonation = TRUE, the site works.