visual studio 2008 localhost URL - asp.net

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/

Related

How to run a web application from the command line in Windows 10?

I've built a web application (i.e., it's got .aspx pages and .dlls, but no .exe) in VS2017. I need to be able to invoke this application on my local machine from the command line. Does anyone know how to do this?
I tried
explorer http://localhost:59135/OAuth2Manager.aspx
But I get an error page saying "This site can't be reached". (If I run the solution from Visual Studio, it comes up with no problem.)
Create site in IIS. Right click it then edit bindings. Use this settings for local use:
type: "http"
Host Name: "YourName.local"
Port: 80
IP Address: *
Also you will need to modify your hosts file to point to your site to the correct address.
Go to
Windows/system32/drivers/etc/hosts
and add: "YourIP" "YourName.local" or use local host IP for example:
127.0.0.1 mysite.local

Access wordpress website on localhost from remote network

I want to show my client the WordPress website on localhost being developed by me (it's still in the beginning stage, not ready to go live yet). This is what I have done so far:
- I have done port forwarding and have tested it (whenever I access my Xampp localhost from the remote network by entering my computer's ip, it opens up the localhost dashboard).
Now this where I'm stuck:
- Whenever, I specify a directory of website (in htdocs) on my remote network's url (like this: mycomputer's ip/folder's name it changes the url to localhost/folder's name and the page doesn't open).
How do I resolve this issue?
Add this line to your wp-config.php might help:
define('WP_HOME','http://your-computer-IP');
define('WP_SITEURL','http://your-computer-IP');
and comment or delete that line when your work from home.
But there's something can be improved. Try to some DDNS services and install their application to your local machine. After installed, you can access your computer from mymachine.ddns.net even you're home or not. So with below setting, you no need to edit anything when you change your work location.
define('WP_HOME','http://mymachine.ddns.net');
define('WP_SITEURL','http://mymachine.ddns.net');

adding website to local iis. getting Server not found error

I am adding a web application to my local iis. I added the path to the folder with the bin is inside. I specified the application pool and applied my login credentials. When I hit test settings, everything passed. When I typed mysite.local on the browser, I get the following. I also clicked on Browse Website and get the same error. This is on my personal PC.
Server not found
Firefox can't find the server at www.comicrage.local.
Check the address for typing errors such as ww.example.com instead of www.example.com
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Have you added mysite.local to the hosts file? If not, add the following to C:\Windows\System32\Drivers\etc\hosts.
127.0.0.1 mysite.local
The hosts file is responsible for any local overrides that should take precedence over DNS.

Localhost is not working in Visual studio web developer 2010

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

Get Visual Studios to use subdomain?

While writing an asp.net project i may have this url for testing/debugging
http://localhost:1234/
I have code that takes in account of subdomains. Can i make visual studios call the same code with
http://anysub.localhost:1234/
You can update your hosts file and put in any subdomin for the localhost:
127.0.0.1 example.com
127.0.0.1 sub.example.com
You can then point your browser to either domain. So long as the debugger is attached to IIS/Dev browser, you will be able debug your server side code.

Resources