This one of the most common errors you can find on Sql Server or ASP.NET forums is Error 18452 Login failed for user. There are three causes, which could trigger that error:
To check the Authentication Mode of Sql Server, we can use xp_logininfo procedure or click Server Properties in Sql Server Management Studio.
exec xp_loginconfig 'login mode'
login mode Mixed
To change the Authentication mode you can edit registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\InstanceNumber( i.e. MSSQL.1)\MSSQLServer\LoginMode with values 0 for Windows Authentication and 2 for Sql Server Authentication. After changing the registry key you have to restart Sql Server. Another way to perform that operation is by using Sql Server Management Studio, which is much easier and safer. Below screen shots illustrate that procedure.



To check we are trying to use exist in Sql Server we can query syslogins table.
Login exists
select count(*)
from master.dbo.syslogins
where loginname = 'wmuser'
1
Login does not exist
select count(*)
from master.dbo.syslogins
where loginname = 'xyz'
0
If you are using Windows Authentication you should check the things listed below
Recent comments
1 year 44 weeks ago