To connect to a local SQLExpress instance with Windows Authentication using Management Studio you will need to set the Server Name and Authentication as follows:
![alt text](../../images/3850112198.webp)
If you are having trouble setting up a new user account, just open up MS SQL Server Management Studio:
![alt text](../../images/3872591074.webp)
Open Security and right click on Login and create a new login:
![alt text](../../images/3795127364.webp)
setting the type to SQL Server authentication and adding a password (don't forget to uncheck the must change box):
![alt text](../../images/3822193813.webp)
You then just have to map the new user to the database:
![alt text](../../images/3829206164.webp)
The easiest way to test this new account is with Universal Data Link (.udl) files. No code required. Simply create an empty text file on a Windows machine with the extension .udl and double click it.
![alt text](../../images/3838184609.webp)
A wizard pops up and you can test your configuration pretty quickly (your instance name, the part to the right of the '\', will be SQLEXPRESS).
![alt text](../../images/3845393590.webp)
And, as a bonus, once you get it working you can open it in a text editor and extract your connection string. If it doesn't work on your local box, try it on the server itself. If that works, skip on down to the end of this for the culprit.
If none of that works, the problem you are probably having is related to the setup of SQL Server itself. Open up the SQL Server Configuration Manager:
![alt text](../../images/3807710322.webp)
then go to the SQL Server Network Configuration:
![alt text](../../images/3830516900.webp)
then double click on the Protocols for MSSQLSERVER:
![alt text](../../images/3841658014.webp)
and make sure that TCP/IP is enabled:
![alt text](../../images/3846442162.webp)
If TCP/IP is enabled, you may be running into firewall issues (it requires port 1433 by default, but it can be configured to a different port).
Edit: As Dave mentioned, you could also run into trouble if you are trying to connect remotely and it isn't allowed. To check/change this, Open up Management Studio and right click on the instance you are connected to:
![alt text](../../images/3843034290.webp)
open the properties window:
![alt text](../../images/3823504530.webp)
and go to the connections tab and insure remote connections are allowed:
![alt text](../../images/3850308798.webp)