How to call a web service using HttpWebRequest?

How to reach home web server having DSL internet connectivity from outside, not using a dynamic DNS service?

  • I have a home PC with DSL, and a separate website hosted with a hosting provider with DNS pointing to the site. I would like to run ASP.NET code on the public site to fetch information /web pages from my home PC. Kindly suggest how to use asp.NET or PHP code. It is OK to periodically call a webservice on the public website from my Home PC to update it with the changed IP address and the WAN address of my home PC. I wonder how chat programs are able to detect the chat client running on the home PC, some similar address finding through the various NAT / firewall layers, etc. is required. THANKS!!

  • Answer:

    You are on the right track. If you are using a router at home then you will need to set up the DMZ settings to allow access to your home server. I do not know why you don't use dyndns, it's awesome and saves you the problem of having to run the update. DynDns has utilities that install on your home machine and update it when your IP changes. Some routers will even do this. As far as the PHP or ASP code there really isn't any. You can use AJAX to call home and pull some html off your home pc and insert it into a page on your public site. I use DynDns and have about 6 free accounts plus run an FTP server for sharing large files. It is simple and wonderful. About 10 seconds after I add the domain name it is visible to the public...maybe even faster!

Hem_S at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.