We help IT Professionals succeed at work.

connectionstring - sqlserverexpress2008

In webconfig - connectionstrings in Visual Studio 2010 I have following:
<add name="MyConnectionString" connectionString="Data Source=MyComputer\SQLEXPRESS;Initial Catalog=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient"/>

The servername in Microsoft Sql Server Management Studio 2008 R2 is MyComputer\SQLEXPRESS. I use Window Authentication.
When I run my website locally I am not able to connect to the database with this connectionstring. What am I doing wrong?
Watch Question

Try (local)\SQLEXPRESS. Something like

<add name="MyConnectionString" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient"/>


That does not work.
Shahan AyyubSenior Software Engineer
See this one:

try this from the link : Integrated Security=SSPI
Is SQL Server running on default port (1433)? If not, please configure your data source like this (local)\SQLEXPRESS,<Portnumberhere>

For example, if sql server is using 1534 as the port number, then your data source looks like below:


Hope this helps!
Guy Hengel [angelIII / a3]Billing Engineer
Most Valuable Expert 2014
Top Expert 2009

First try to login using Management studio. may be has some other problem.
Could you elaborate on what was your problem and how the solution helped you? I am asking as you mentioned that solution did not work in post # 32980720