0

I tried to make a mail service with connection to the SQL Server, when I reached

 con.open(); //where con is the sqlconnection string

It said:

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: 26 - Error Locating Server/Instance Specified)

I tried to enable tcp/ip, checked all services and it were enabled! and even I gave permissions to own user (me). Still it didn't work!

What can I do now ?

4
  • try telnet ip 1433 Commented May 4, 2016 at 13:12
  • 3
    are you able to connect to the database from SQL server management studio. Commented May 4, 2016 at 13:18
  • do you close the conn after you finished using it? Commented May 4, 2016 at 13:37
  • @Manish i am able to Commented May 4, 2016 at 13:53

1 Answer 1

2

I am solving that problem by opening Services then start running SQL Server (SqlExpress) service.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.