Click here to Skip to main content
15,878,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Updated 22-Jun-20 20:43pm
Comments
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

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.
 
Share this answer
 
Comments
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900