[英]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,但无法克服一些问题。最后,我在Web服务器上的朋友空间中进行了测试,谢谢您的回答
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.