siby sunny siby sunny - 16 days ago 6
C# Question

Remote DB connection string failed

I need to connect the db on another system. while i tried the connection string as

SqlConnection con = new SqlConnection(@"Data Source=(192.168.0.125)\SQLEXPRESS,1433;Network Library=DBMSSOCN;Initial Catalog=db_Stock;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";


error shown:


"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: TCP
Provider, error: 0 - No such host is known.)"

Answer

i fixed the issue by following the below site and instructions

link to the site]site

Comments