开发者

Possible to connect hosted web application to local database?

开发者 https://www.devze.com 2023-01-19 19:12 出处:网络
Is there any tech out there that allows for a hosted web application to connect to a local database? For example, say I would like to write some web-based software for a popular point-of-sale solution

Is there any tech out there that allows for a hosted web application to connect to a local database? For example, say I would like to write some web-based software for a popular point-of-sale solution. The id开发者_StackOverflow中文版eal would be to have the customer input their database connection credentials and have the application connect to their locally hosted database.

Why would I want to do this?

  • Low barrier to entry to use software: no data exports / imports
  • No need for customer to install a publicly exposed web service
  • For web apps with private data sets (think ERP, POS, CRM), the private data could all be hosted locally

Is this a pipe dream?


Unless you have control over your customers network, this isn't really practical because SQL server needs a TCP port to communicate over, and that port needs to be open on your customers network - AND publicly accessible over the open internet (possibly a big security concern). This is why people usually use web services - if you hack a webservice, well, you can use the webservice... If you hack a database you can do anything you want to it including purging/corrupting the data in any way you like.

The default SQL server TCP is port 1433, but you can change this port if you want to.

Otherwise, if you arent concerned with opening a port on your customers network and having that port open to the database from the public internet, you can actually do what you are describing... I've actually done it myself for a merge replication project in the past over the open internet. So no, this isn't a pipe dream - it is just mostly impractical in most scenarios due to security concerns.

Security concerns can be mitigated through a good secure encrypted connection to the server, however. See http://msdn.microsoft.com/en-us/library/ms191192.aspx for more details, if you want to go that route.

0

精彩评论

暂无评论...
验证码 换一张
取 消