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.

How can I use my own PC (Win 7 Home Premium, SQL Server 2008 Express,IIS 7.5) as web server for my ASP.NET MVC Website?

[Update] : I know how to run IIS in Win 7 and locally I can host my web. My goal for asking question was is possible to use PC as host for website I mean a user on web can write the url or my IP and access my web ?

share|improve this question

migrated from stackoverflow.com Jan 30 '10 at 6:58

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

4  
There's a lot of moving parts to your updated question, and it might be better asked on Serverfault, as they probably know how to configure your machine so that it is accessible to the outside world. You need an ISP with a static IP, a properly configured router, and a few other things to make this work. Your residential ISP probably will not allow you to do this without special arrangements. –  Robert Harvey Jan 30 '10 at 6:23
1  
And that's probably especially true since the asker's location is Tehran. –  Dave Jan 30 '10 at 6:29

4 Answers 4

up vote 3 down vote accepted

was is possible to use PC as host for website I mean a user on web can write the url or my IP and access my web ?

If people access your IP directly, yes, they will be able to see the site. However, if you run behind a router, you will need to port-forward port 80 on your router to the box that hosts the IIS server. Detailed guides for how to do this are available at your router manufacturer's website, or more conveniently, at portforward.com. In most cases, your consumer-grade ISP is going to have restrictions on what ports you can have open -- many filter incoming HTTP connections and would prevent you from running a server this way.

Note that if you're running this at home, your IP is probably dynamic and will change over time, so the IP address you give out today may not be valid tomorrow. Try looking at a service like dyndns.com, which maps a dynamic IP to a static hostname.

To use a fully custom host name will require that you tell your DNS provider how to resolve requests for the host name you want to use. For instance, if you want example.com to map to your box at 80.70.60.50, you need to tell your DNS registrar to resolve requests for example.com to 80.70.60.50. The exact steps to follow will depend on your registrar and a number of other factors, so ask your registrar's support email.

share|improve this answer
1  
Most hosts explicitly filter port 80 (HTTP) and port 25 (SMTP) to help prevent infected machines from spreading malware and spam. –  envalid Jan 30 '10 at 6:26

you could install a Virtual PC with Windows 2003 Server (IIS 6.0 better idea) OR windows XP (IIS 5.1) Framework 3.5 and SQL SERVER 2008

share|improve this answer

Installing IIS 7.5 on Windows 7 Home Premium, Home Basic, or Home Starter http://technet.microsoft.com/en-us/library/cc731911.aspx

share|improve this answer

You'll need either a static IP address, or to use something http://www.dyndns.com/. That'll let you actually reach your local network. You'll then need to open port 80 in your firewall, which you can learn to do at http://portforward.com/. Then make sure that your Windows Firewall is set to allow traffic on port 80, which is explained here.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.