Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Please excuse me if this is very basic.

My query is about hosting a .net web application on a server. Say, I create a small web application and I deploy this application in my home machine (which has an IIS server).

How do I access this application from a remote location, some other computer in another network. How is this possible?

Thanks

share|improve this question
    
If your server has a public IP address then you should be able to access it as long as you open up your firewall for the service port (80 typically for http). If you have a router and NAT going on then you need to look into port forwarding. –  StackOverflowException Jun 3 '11 at 13:09
    
If you don't use VS' Webserver Cassini but the IIS it's no problem to access it from a remote machine if it has network access to your local computer. You only have to configure it in IIS. –  Tim Schmelter Jun 3 '11 at 13:11
add comment

migrated from stackoverflow.com Jun 5 '11 at 1:46

This question came from our site for professional and enthusiast programmers.

2 Answers

If you have a static IP address on your connection, then you can connect by that, or point a domain name to that. You will need to configure your firewall to take requests on port 80 and send them to your machine which is referenced by internal ip (which will need to be static) or by UNC.

If you don't have a static IP, you can use a service like DynIP

share|improve this answer
    
Thanks John. But how do I determine if mine is a static or dynamic IP? –  Nishant Jun 3 '11 at 13:22
    
You can't port forward to a UNC path... –  pseudocoder Jun 3 '11 at 13:23
    
Surprising, my router uses the UNC value when you assign a rule to a machine. It comes with some predefined rules like web server, and it reads the UNCs itself. Netgear if you were wondering. –  John Jun 3 '11 at 13:42
    
@Nishant - I think @pseudocoder has given you a very detailed explanation. I prefer to give clues and let you explorer. Thumbs up for @pseudocoder though! –  John Jun 3 '11 at 13:43
    
@John: Thanks for the support, yeah companies should have to get a permit to write home router firmware. Do you have to provide a SMB share name or is \\127.0.0.1 enough? Just curious. –  pseudocoder Jun 3 '11 at 13:52
show 1 more comment

I love basic questions, they're easy to answer!

First of all, determine your IP address. That is the "public" IP address of your home router, which is the only address that is reachable over the Internet: http://whatismyipaddress.com/

If you're not paying your ISP extra, it is probably NOT a static address. This means it might change from time to time, and if you want people to be able to connect to a server in your house, you need to provide a static DNS name for them to use to connect. You can accomplish this using DynDns: http://www.dyndns.com/services/dns/dyndns/

Finally, you need to get incoming traffic from your router to your computer. This involves configuring your router to "port forward" incoming Port 80 traffic to Port 80 on your PC. For guides on how to configure port forwarding on your router: http://portforward.com/

Hope this helps, if you need any specific details post a comment.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.