1

I created an SQL Alias:

Name: CIHDB
Server: SQLSRV
Protocol: tcp
Port no: (empty)

My connection string within Visual Studio says:

Data Source=CIHDB;Initial Catalog=CIH;Integrated Security=SSPI;MultipleActiveResultSets=True;Application Name=EntityFramework

But that fails with the error: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.

When I change the "Data Source" in the connection string to "localhost," I connect with no problem.

I am thinking that I am using the wrong protocol in the Alias.

Can anybody shed some light on this?

Thanks Eric

1 Answer 1

3

When I used both

cliconfg.exe

and

c:\windows\syswow64\cliconfg.exe

(64 and 32 bit versions of cliconfg.exe)

I saw that tcp/ip was not enabled and so once I fixed that, all fell into place.

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.