Interfector
Interfector

Reputation: 1898

Cannot add App_Data SQL Server database

Using Visual Studio 2010 10.0.20319.1 RTMRel and SQL Server Express 10.50.1600.1 I'm trying to add a new SQL Server Database .mdf, however, I receive the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 – Connection string is not valid)

I have enabled TCP/IP and Named Pipelines, added Firewall Exceptions for Sql Server, I am successfully connecting from VS in the Server Explorer window.

I would appreciate if someone can pint me to a solution to my problem.

Thank you.

Upvotes: 1

Views: 1374

Answers (2)

Simon L-D
Simon L-D

Reputation: 11

I think that SQL Server must be running locally to be able to create those databases.

  • I was getting the same error
  • Started my local .\SQLEXPRESS instance
  • no more error, and a cute .mdf file was created

Upvotes: 1

SQLMenace
SQLMenace

Reputation: 134923

According to your error

(provider: SQL Network Interfaces, error: 25 – Connection string is not valid)

check here what your connection string should look like

http://www.connectionstrings.com/sql-server-2008

Upvotes: 0

Related Questions