Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda