简体   繁体   English

获取SQL以在特定的入站端口范围客户端上运行

[英]Get SQL to run on specific inbound port range client side

I have a issue where an application I am writing (written in .net using C#) has started to be blocked by the firewall when making SQL connections, the reason seems to be the inbound port client side is coming in on a massive range that isn't allowed by the firewall (around port 50,000 - 60,000). 我有一个问题,我正在编写的应用程序(使用C#在.net中编写)在建立SQL连接时已开始被防火墙阻止,原因似乎是入站端口客户端进入的范围很广,被防火墙允许(端口50,000-60,000左右)。

Is there a way to make SQL connections run on a specific inbound port range client side so this smaller port range can be added as a exception to the clients firewall? 有没有一种方法可以使SQL连接在特定的入站端口范围客户端上运行,以便可以将此较小的端口范围作为例外添加到客户端防火墙? The server uses Microsoft SQL Server 2008. 该服务器使用Microsoft SQL Server 2008。

I know one solution is to add the application itself to the firewall but the delployment method used at the company is Click Once and when it updates it changes the directory of the installed program meaning an admin has to update the firewall for each client every time an update is made. 我知道一种解决方案是将应用程序本身添加到防火墙,但是公司使用的部署方法是单击一次,当它更新时,它更改已安装程序的目录,这意味着管理员每次必须为每个客户端更新防火墙。进行了更新。

As I pointed out in my comment (quoting myself here), you might want to consider moving the queries in a web service, and let it provide you the data (it'll be deployed on a specific, well-known port, so you'll be alright). 正如我在评论中指出的那样(在此处引用我自己),您可能需要考虑在Web服务中移动查询,并让它为您提供数据(它将部署在特定的知名端口上,因此您会没事的。

More on the subject: I strongly recommend you never allow the outside world inside your corporate database, it's a big security issue. 有关此主题的更多信息:我强烈建议您永远不要将外部环境包含在公司数据库中,这是一个很大的安全问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM