Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Can't Connect to SQL Server if default port is not specified

I've hit an odd situation with connecting to a SQL Server instance. The instance is running and listening on port 1433 however I can't connect unless I specify the default port of 1433 in the connection string.

Does not work:

<add name="DataContext" connectionString="Data Source=192.168.150.1\sqlinstance;Initial Catalog=DATABASE;Persist Security Info=True;User ID=dbUser;Password=dbPass;MultipleActiveResultSets=True; Asynchronous Processing=true;Max Pool Size=700" providerName="System.Data.SqlClient" />

Does Work:

<add name="DataContext" connectionString="Data Source=192.168.150.1\sqlinstance,1433;Initial Catalog=DATABASE;Persist Security Info=True;User ID=dbUser;Password=dbPass;MultipleActiveResultSets=True; Asynchronous Processing=true;Max Pool Size=700" providerName="System.Data.SqlClient" />

This only started happening recently and only affects our testing environment. Our production environment is configured identical except for the IP address and it does not suffer from this. It's not a big deal to just add the port to the connection string but I'd like to figure out how this happened. I should also mention I don't have issues when using Management Studio or just using telnet to verify the port is open. I'm thinking this might be a C# or .net issue rather than a SQL Server configuration issue.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

set ms sql client protocols "shared memory" and "named pipes" as disable if use only tcp ip - connection string without default port

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!