简体   繁体   English

在线Web服务从我PC中的数据库中获取数据

[英]Online Web Service That Takes Data From Database In My PC

Hello I have a Web Service that connects to my local SQL Server 2008 and takes data from a table and then sends them to a WPF app i am testing. 您好,我有一个Web服务,该服务连接到我的本地SQL Server 2008,并从表中获取数据,然后将它们发送到我正在测试的WPF应用程序中。

As long as the Web Service is running from my PC everything runs nice and smooth. 只要从我的PC上运行Web服务,一切都将顺利运行。 Now I want to upload this Web Service to a site i have so i can test the call online but i don't know what connection sting i must use so that the Web Service can locate my local SQL from internet when i call the web service. 现在,我想将此Web服务上载到我拥有的站点,以便可以在线测试呼叫,但是我不知道我必须使用哪种连接方式,以便在我调用Web服务时,Web Service可以从互联网上找到本地SQL。 。

Also do i have to make any change to my SQL to achieve this? 我还必须对我的SQL进行任何更改以实现此目的吗?

Ngrok is a good tool to do something like that. Ngrok是执行此类操作的好工具。 With ngrok you can create a tunnel from internet to your PC in specific port (database port). 使用ngrok,您可以在特定端口(数据库端口)中创建从Internet到PC的隧道。 The only thing you need to change on connection string is the server parts, and point to url that ngrok gives to you. 您唯一需要更改的连接字符串是服务器部分,并指向ngrok提供给您的url。

Ngrok website Ngrok网站

我尝试使用ngrok,但无法克服一些问题。最后,我在Web服务器上的朋友空间中进行了测试,谢谢您的回答

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

相关问题 Web服务可在我的PC上运行,但不能在服务器PC上运行 - Web Service work on my pc but doesn't work server pc Web 门户从 Web 服务或数据库中获取数据 - 架构模式 - Web portal taking data from web service or database - architecture pattern 如果数据是新数据,则仅从Web服务更新本地数据库中的数据 - Only update data in local database from web service if the data is new 使用RESTful Web服务从MySql数据库中检索数据 - Using a RESTful Web Service for retrieving data from a MySql database 创建基于SOAP的Web服务,该服务存储从请求到数据库的数据 - Create a SOAP based Web Service that stores data from request to database 如何将数据从脱机数据库发送和接收到Web服务? - how to send and receieve data from offline database to a web service? 用C#构建的Web Service从mySQL数据库中检索数据 - Web Service built in C# to retrieve data from mySQL database 将SQL Server数据库公开为Web服务以从中获取数据 - Expose SQL Server database as web service to get data from 检索/获取数据以从连接到远程MySQL数据库的PHP服务显示到我的ASP.Net Web应用程序 - Retrieve/fetch data to display to my ASP.Net web application from PHP service thats connected to remote MySQL database 从Web服务返回自定义对象需要很长时间,为什么 - Custom object return from web service takes long, why
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM