Login Failed For User

When I hosted an ASP.NET C# project on Windows Server 2012 with IIS, the below error appeared.

Let's learn how to overcome this error. 


I found the solution for this issue and I would like share with others.

Step 1

While installing SQL, we have to select "Mix Mode Authentication".

Step 2

Include the username, for example - sa and password: abc@123

Step 3

Then, create a table using SQL Server Authentication.

Step 4

Place the connection in web.config file.

  1. <connectionStrings><add name="ABC" connectionString="Data Source=ServerName; Initial Catalog=DataBaseName; User ID=sa; Password=****** " /></connectionStrings>  



Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now