Cannot connect to SQL Server 2012

352420 pts.
Tags:
Server Connection Failed
SQL Server 2012
I'm having trouble connecting to SQL Server 2012 database using C#. I get the following error message when I try to connect:

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)

Note, both the server and software are on the same computer and I am using an SQL login called Logger, mapped to the database using the same text as the password.

I'm trying to connect using this:
SqlConnection sql = new SqlConnection("Server=(local)MSSQLSERVER;Database=Test;User ID=logger;Password=logger;Trusted_Connection=False");

sql.Open();


I'm pretty sure I have the server set up to take remote logins. Any idea as to what I am missing?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following