Localhost is not working in Visual studio web developer 2010 - asp.net

i am having problem with my visual studio 2010 web developer , when every time i run my aplication my localhost is not working i dont event use IIS for my project just a localhost and page not found i have tried to configure my internet properties and checked USE a proxy server for the connection , but still my localhost does'nt work , is there any other way to fix my problem , please help me

Add the following line to your C:\Windows\System32\drivers\etc\hosts :
127.0.0.1 localhost
Ps: to edit hosts, copy it to your desktop, add the line : 127.0.0.1 localhost , save , copy the new host to your folder C:\Windows\System32\drivers\etc\ then replace the old one

The problem could be in another application you are running.
Visual studio uses the same ports/localhosts like steam and other applicitions.
To clear this, make sure the program you think is causing the problem doesnt start automaticly start when your PC starts and then restart your pc.
if that isn't the problem you schould look at your localhost itself by typing 127.0.0.1 in your browser to see if it works

Related

Unable to start debugging on web server, localhost subdomain

I am using VS2013, IIS7, and have set a subdomain in IIS and my hosts file to point to 127.0.0.1.
I've created the secondary website, and have the http binding in IIS pointing to localhost.subdomain.com.
Things i've tried:
IISReset
Deleting Site in IIS, Deleting app pools, re-building from scratch
Cleaning/Re-building solution/Restarting Computer/Visual Studio
Creating Virtual Directory through VS, even tried tying to IISExpress to no avail.
Also, i can go directly to the site in a browser just fine using the http://localhost.subdomain.com and traverse through it all, it just fails to load into Visual Studio for debugging. All debug info is set correctly through project properties as well.
There are a bunch of people within my office with the exact same setups that i've sat down with that work fine on their machines, but not on mine. I've exhausted my google and microsoft.com searches at this point, any suggestion would help.
Visual Studio is unable to resolve the domain because it likely hasn't been added to your hosts file.
If you edit the hosts file found at C:\Windows\System32\Drivers\etc\hosts to include your subdomain:
# rest of hosts file here
127.0.0.1 api.localhost
Then your debugger should start working again.

visual studio 2008 localhost URL

everytime I try debug my website I press the F5 key. It will always start with this address
http://localhost:xxxxx/Default.aspx
but the website wont run unless I change the localhost to 127.0.0.1. How do I allow it to run even though it is localhost without having to specify the URL in my project properties?
Add localhost 127.0.0.1 to your hosts file ref http://helpdeskgeek.com/windows-7/windows-7-hosts-file/

Firefox can't find the server at www.localhost.com

When i run my asp.net application it shows error on web page
"Firefox can't find the server at WWW.localhost.com"
I am using Visual Studio 2010 Ultimate and Windows 7 OS and Browser Firefox
Please Give me super and Permanent solution as much as fast because i have to complete my asp.net project so soon
try using
http://localhost:80/
80 is the port number.. change accourdingly
or if u run directly then u have to change the configuration from
www.localhost.com to http://localhost
I hope you are putting the URL in a correct way i.e., http://localhost:portnumber
If you are doing above correctly and page is still NOT showing, this maybe due to some proxy you maybe using. See the below image, highlighted option is showing that I don't want proxy to resolve my loopback addresses.
This is also possible that you are using Internet Explorer's settings for proxy, the same option also present in internet explorer.

Publish Visual Studio 2010 web application to localhost

I created a new web application in visual studio 2010.
I tried to publish it to the same computer (localhost) Windows7 64 bit/IIS7
No luck
I read some remarks from others, I also tried to specify the machine name instead of localhost.
I also tried creating a web setup project...
When I "surf" to localhost , I get the IIS7 welcome screen.
you don't need to publish it, just point the virtual directory in iis to your source code.
To host your web application, firstly you need to publish the app to a desired location; after publishing, then open IIS Manager(type "inetmgr" in run and hit enter) and go through sites path from the left panel and then right click on the sites and select "Add website"; In the next step, Add Website form will be opened asking you to enter some details; Enter the sitename, link the physical path to where you previously published and lastly give the port num; If you want to open that website in the port 80 itself, leave it as 80 and then click OK.. You can now browser your published web application... :)

asp.net setting up subdomain on localhost

I added the following entries in the HOSTS file.
127.0.0.1 abc.localhost.com
127.0.0.1 xyz.localhost.com
Using the VS2010 ASP.NET Development server I am unable to run or execute the website.
When browsing http://localhost:2687/TestProject/ it shows up the default.aspx page. But when accessing http://abc.localhost:2687/TestProject/ it shows a website cannot be found page.
Is there anything else to be done when setting up subdomain on localhost.
EDIT: To make this work I removed the .com and in IE-->Connections-->LAN uncheck everything. Subdomains with port works are correctly getting forwarded. Nothing else need to be configured.
Obvious mistake is that in your hosts file you have abc.localhost.com, whereas you are browsing to http://abc.localhost/folder
Not the same thing.
Not sure this will work as you intend anyhow. I would also recommend IIS Express, part of WebMatrix, which I think is still in beta, or just use IIS. IIS 7+ on Vista, W7, Server 2008 is all really easy to use.
Use IIS or IIS express, rather than Cassini. (For several reasons, which you can google or look for on stackoverflow)
With the IIS you can easily add a hostheader entry to you webapplication with just 2 clicks.
Be aware, that you are assigning both a Url and a port.
So adding abc.localhost won't allow you to browse abc.localhost2687, just the default port (80). If you also want to browse to abc.localhost:2687 you need to a a hostheader entry according to that that Url and port.
This screenshot shows you the dialog to add hostheaders (the picture is from IIS 6, but in IIS 7 or IIS 7.5 it looks very similar)

Resources