Home
Products
Forums
Help
Publish Article
Go Freelance

SqlClient.SqlException - Login failed for user

Recently I run into login problem with my Microsoft SQL Connection in my ASP.Net application. The application was working fine on my devleopment machine night before. Next morning all my connections starting failing and I was seeing SqlException in my code.

I knew that the login account was valid because I could see in in Sql Server Management Studio. Since nothing was changed in application for for some time so I started looking elsewhere. Thats when I realized that last night I had to reinstall Sql Server 2005 on my machine and I probably changed the install options. And thats what exactly it was. I forgot to choose mixed mode authentication and left it to be windows authentication. And that explains the error that there is no windows user for which I was specifying credentials in the connection string. After I switched the mode to mixed mode authentication everything was back to normal. Following snap shot shows where you need to make this change if you run into same problem. This snap shot is for Sql Sql 2005 - Developer Edition.

Go Freelance
Home     About us     Contact us    Copyright    Privacy Policy    Return Policy    Advertisers
Copyright © Netomatix