I m faced this problem during setting up the Development Server Envirnonemt for DotNetNuke where web apps in Server A and Database sit in Server B. For more information, you can refer this link (If SQL Server is running on a remote computer and the Web server is running IIS 6.0, give the Web server's machine account login privileges on the remote computer. The machine account is referenced as DOMAIN\MACHINENAME$. by MSDN article)
I know I can solve this problem by creating a user login, but I do not wish to use User Login but windows account for security reason, putting user name and password in web.config is a not a good practice.
When I m try to launch the website, I got the Login Failed error message, checked in ASP.NET forums and other technical forums, finally I found this.
exec sp_grantlogin [domain\machineName] which you can refer from this link
This solved my problem.
[...] Get more after the jump at .NET Developers Blog [...]