Connecting to SQL Server via ASP.NET

  Kiến thức lập trình

I created a SQL Server database on my computer, I use the MSS Managment Studio environment to manage the database. I then added a login, selected SQL Server authentication for that login. I can connect to the database using this login and password through MSSMS, but I can’t do it in .NET.
I use a connection string like this:
“Server=serverName;Database=databaseName;User Id=userName;Password=password;”. I’m sure everything is fine in the code, the problem must be either in the wrong connection string or in the wrong database configuration. Anyone have any ideas? I take the data for the connection string from MSSMS from Connection Properties.