Error connecting to SQL Server 2008 R2 Express

前端 未结 3 2098
天涯浪人
天涯浪人 2021-01-25 00:54

I have installed SQL Server 2008 R2 Express on Windows 7.

When I run a web project in VS2010 I receive the following error:

A network-related or i

相关标签:
3条回答
  • 2021-01-25 01:28

    red cheeks

    Found the problem. Web.config configured with a session db, but no session db created and wasn't planning any longer to do so. Forget to turn it off ...

    0 讨论(0)
  • 2021-01-25 01:30

    Did you try to use SQLExpress as instance name in the connection string?

    PCName\SQLExpress
    

    Moreover check if your server is configured to accept connections via TCP/IP (check Sql Server Configuration Manager). Can you connect to your database using SQL Server Management Studio? Test your connection from Visual Studio, does it work?

    0 讨论(0)
  • 2021-01-25 01:48

    Named instances that aren't using a TCP binding are usually referenced as .\[instance name], such as .\SQLExpress or perhaps .\SQLServer in your example.

    0 讨论(0)
提交回复
热议问题