简体   繁体   中英

Remote DataBase Access Any were over the internet

Suppose I have two PC both can be any were over the internet. I required to access database of PC1 through PC2 . Below screen shot of my IP Version Protocol Dialogue Box.

在此输入图像描述

NOTE: PC1 is my PC where database should reside and PC2 will be any PC over the internet

I am using SilverLight For Developing WebSite\\WebPage. And for locally accessing database(MS SQL Server) I am using following connection string.

<connectionStrings>
<add name="SkiResultEntities" connectionString="metadata=res://*/SkiResultModel.csdl|res://*/SkiResultModel.ssdl|res://*/SkiResultModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=PRITESHARYAN-PC\PRITESHB_ARYAN;Initial Catalog=SkiResultData;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    </connectionStrings>

What should be the modification I have to make in my connection string or in SQL Server Database Settings? So Database in My PC that is PC1 can be accessible from any were over the internet... Please Help.....

You can try creating a VPN between the two computers using these instructions . I have not tried this and based on several online comments and questions, this gets difficult with different versions of Windows.

Given that you are using Silverlight, the remote PC will not access the database directly, but via your server that is running on PC1.

It is fairly complicated and involved. Steps:

  • Set up IIS

  • Deploy your Silverlight application to IIS (you need to change your connection string to use a username, password - not integrated security). Verify it works.

  • Modify router to forward port 80 requests to 192.168.137.115:80

  • Modify your PC firewall to enable inbound port 80 traffic

  • Obtain your router's IP Address (use http://WhatsMyIpAddress.com )

  • Verify port forwarding works by going to http://xxx.xxx.xxx.xxx from the previous step.

  • Provide the URL above to user on PC2 (note that some ISPs may change your IP address).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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