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

I have created a .Net Web Application. Now i need to run my application under my machine IP instead of local host.

Can anybody give me the solution?

share|improve this question

migrated from stackoverflow.com Feb 5 '10 at 14:14

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

    
Are you wanting to access the site under your internal network IP such as 192.168.1.xxx, your external IP address, or just the localhost equivalent (127.0.0.1)? –  Steve Danner Feb 5 '10 at 13:55
    
This type of question is better addressed on serverfault.com It's unclear from the question if you need help with setting up IIS to respond at a particular IP, or if you need help in figuring out how to assign one of your public IPs to the server itself. For the former, look into IIS Management Console, under "Properties" for a given site, the "Web Site" tab of this control provides a way to add/remove IPs ("Web Site Identification"). For the latter, the conection Manager will do. At any rate, contributors to ServerFault.com will have all these details for you... –  mjv Feb 5 '10 at 14:04
    
very basic question dudes: @Srikanth, try what I posted bellow. It is development related issue; which I solved after googling.. –  effkay Feb 5 '10 at 14:05

3 Answers 3

Substitute your local IP for localhost should do it.

share|improve this answer

This happens normally on windows vista - where HOSTS file contains the IP V6 entry for local host which is not resolved.

Edit your HOSTS file;

C:\Windows\System32\drivers\etc\hosts

Find following line:

::1             localhost

comment it by adding # at line start

#::1             localhost

and add following:

127.0.0.1 localhost

Restart your machine - now http://localhost will start working

share|improve this answer

Right click Web Site (Default Web Site in our case) and click on Properties
Click Advanced… button in the Web Site tab
Click on Default and click Edit…
Under IP address: click on the drop down list and select the machine ip

Now, when you try to access the Web site using http://localhost or http://machine_name it will give 404.
You will need to access the web site using http://ip_address and that would work.

HTH

share|improve this answer

Your Answer

 
discard

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