Click here to Skip to main content
14,579,188 members
Rate this:
Please Sign up or sign in to vote.
Using a C# Windows client/server application with SQL Server.

On the SQL Server machine, I enabled TCP/IP in networking and wrote inbound firewall rules to access the database.

On the client machine, I added outbound firewall rules to access server, and it worked.

But now suddenly, the client machine stops responding, and throws an error

What I have tried:

error message:
Can't to find mentioned TCP host
Updated 22-Jun-20 20:43pm
RedDk 24-Jun-20 8:16am
Quote: "throws an error".

It might be helpful to tell cpians what kind of error this is (crashes the machine, blue-screens the machine, shows up in computer Management under Event Viewer, etc) or, if a textbox with an actual error message appears on screen, the exact text of this "error". I see TCP host is mentioned but to be honest I've never seen TCP host errors in the flesh only through ditched processes stepping out of rolled-over "SQL Server Configuration" regurgitations where zombies like "Named Pipes" and "Shared Memoory" come at you as if they would eat your enabling brains.

Also antivirus programs (typically third-party but of late native) make it a habit of flexing port address coding muscle by making it possible to prescribe to hard-wired digits. Like 'yer 1433.
Rajasekaran Bose 25-Jun-20 1:58am
I using windows 7 os on server machine. and using Windows 10 on client machine. Is there any chance to firewall and connectivity problem for this?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

We can't fix that for you - you need to start looking at your network and the names / IP addresses you have assigned.

If you are connecting to a WLAN / LAN based SQL Server machine via an IP address, then you need to check that the IP address of that machine has not changed - most routers issue them on a first-come-first-served basis so if the router is power cycled the Server may not get the same IP address again (this is called Dynamic addressing). It is possible to set routers to always allocate the same IP address to a specific machine (called Static Addressing), but the "how" of that varies from router to router.

A much better idea is to connect via a name rather than an IP address.
Rajasekaran Bose 23-Jun-20 21:56pm
Dear Friend, I share my connecting lines
"Data Source=tcp:software-pc\sqlexpress,1433;Initial Catalog=Dance;User ID=abc;Password=xyz" I didn't use ip.
Rajasekaran Bose 23-Jun-20 21:59pm
Also I wrote inbound and outbound for 1433. What to do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100