agentpx
agentpx

Reputation: 29

I'd like to access my Localhost web site from the Internet using ASP.Net/C#. Any Ideas?

I have a Localhost website that I would want to access from the Internet. I know this can be done. Something lik what Utildev is doing. Can anyone give me some tips on how to accomplish such? Thanks in Advance. BTW I love StackOverFlow. :D

Upvotes: 2

Views: 3843

Answers (4)

Charitha Goonewardena
Charitha Goonewardena

Reputation: 4714

Since you are running on iis server u can do a trick. there is a node package called iis-express-tunnel, which can expose you local host to internet very easily. You just have to follow some steps in order to accomplish that.

You must have installed node on you machine

STEPS

1) Install npm package iis-express-tunnel

Open command prompt, paste npm install -g iis-express-tunnel then enter

2) Expose the local host to entire world

On the same command prompt type iis-lt --subdomain servicename --port 8000 Make sure you supply your service/site name and correct port number of the local host service.


Eg: enter image description here

Upvotes: 1

leepowers
leepowers

Reputation: 38308

At least three things you'll need to set up to expose your localhost/local web server to the internet.

  • Dynamic DNS: use a service like No-IP or DynDNS to assign a domain name that will always point to your local network.
  • Setup Router: whatever router you're sitting behind will need to be configured to forward port 80 (or a development port like 8080) to your local IP address. Your router uses DHCP to assign local ip addresses (an IP like 192.168.0.xxx). This local IP is not fixed and will most likely be changed by the router at some point (especially if the router is reset/rebooted).
  • Open Firewall: On your localhost/local computer, make sure any firewall has port 80/8080/etc open.

There's multiple failure points on this type of setup - your router can re-assign a local IP; the internet connection can be slow/laggy - most ISPs are asymmetric (i.e., they jack up the download rate but leave the upload rate super-low); the localhost computer needs to be hardened like any web server and treated like a web server.

A better option is to get a VPS from a provider like slicehost, do development on your local machine then use the VPS as a staging server and periodically upload changes to the staging server (using version control like SVN or Git when multiple developers are involved). The benefits to this setup are multiple: fast synchronous network response, constant connection, no dynamic dns tricks, the staging version of the site is always on, even if your localhost computer is not on, redundant power, managed backups, etc.

Upvotes: 3

Kalpak
Kalpak

Reputation: 3530

Just a out of the way solution than doing router setting and firewall settings. You can use softwares like team viewer/Tight VNC to remotely access your machine. So not just the localhost website but the whole machine is at your service. Just bear in mind the security concerns in this approach.

Upvotes: 1

Crowe T. Robot
Crowe T. Robot

Reputation: 2045

This is highly not programming related.

You're going to need, probably, two things.

You're probabl using an internet connection behind a router. You're going to need to "forward" the port your webserver is running on (default 80), to your local IP.

Then you'll need your external IP address, goto www.whatismyip.com to give that to others to visit your site.

Upvotes: -1

Related Questions