This may seem obvious, but I had this error when trying to use LINQ to SQL with my business logic in a separate class library project.
I created DBML in a class library with all my business logic and custom controls in this project. I referenced the class library from my web project and tried to use it directly from the web project.
The error indicated that the login failed for my username. My username and password were correct, but the fix was to copy the connection string to the right place. I found out about the problem from another site and thought I'd take a note here.
Error: Login failed for user 'username' System.Data.SqlClient.SqlException
linq-to-sql
Adrian Sep 18 '08 at 22:18 2008-09-18 22:18
source share