Cant connect to SQL Server instance RRS feed

  • Question

  • Hello!
    I want to ask you about a problem.
    I have developed a windows application that uses a sql database, which uses SQL Authentication (with a username and password) to log in. The database is located on a local server which uses the same networks as my company computers.
    Now I have published the application and installed it on my computer (where I developed it and in which I also have the SQL server installed). I also installed the application on the computers of some colleagues who do not have any program installed (they do not have "visual Studio" or "Sql server" installed). Now when I log in to the application from my computer everything works fine.
    (database communication works very well). But when I try to log in from other computers (with the same user I used on my computer) it does not work. Error is displayed:
    "named pipes provider error 40 could not open a connection to sql server".
    I did these steps on the server where the application is located as:
    1: Enable TCP / IP in SQL Server Configuration
    2.Open Port in Windows Firewall 1433
    3.Allow remote connections to this server

    Can you help me with any suggestions

    Tuesday, November 17, 2020 7:59 PM

All replies

  • Hello,

    This forum is for C#, for assistance with SQL-Server authentication use the following forum and use a proper tag for SQL-Server.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    My GitHub code samples
    GitHub page

    Tuesday, November 17, 2020 8:13 PM
  • It sounds like a connectionstring problem.
    Tuesday, November 17, 2020 9:05 PM
  • Determine the IP address of the server where SQL Server is installed.

    In your connection string, use the IP address instead of the server name. See if that works. If it does then the problem is with address resolution. I assume your SQL server uses a static IP? :-) If not then you'll have to find a way to resolve the address, as using a hardcoded IP won't work.

    Keep in mind that using the IP instead of the name is for troubleshooting only. Not recommended for production release. Good luck! Saga

    PS: As karenInstructor mentions, this forum is for C# questions. Next time target your post in the forum for that technology. Here you'll get some answers, but in the SQL Server forum you have the possibility of getting more answers.

    You can't take the sky from me

    • Edited by SagaV9 Tuesday, November 17, 2020 9:29 PM
    Tuesday, November 17, 2020 9:25 PM