Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a setting in asp.net properties in which you can set the virtual directory to your own ip address other than "http://localhost:61259/" so you can access your web application from a different computer without the use of iis?
Posted
Comments
Bernhard Hiller 2-Oct-14 5:04am    
That is: your machine is running Visual Studio, and you are "debugging" your web application?
I tried something like that long ago, I do not remember exactly. I guess there was a setting somewhere in Visual Studio: by default, it accepts web requests from localhost only.
Also add the full page name, i.e. http://youraddress:port/yourpage.aspx

localhost is the loopback address along with 127.0.0.1, you can replace it with the IP address of your network adapter for the machine.
 
Share this answer
 
Comments
icode_chan 1-Oct-14 4:11am    
Hi, i replaced it with http://192.9.200.182:61259/, click create virtual directory and it says unable to create virtual directory. Any steps you can provide? (newbie here)
Hi,
here's a hack or something..
1. Open your project file using a notepad. (I use notepad++).
2. Locate IISUrl or a 'localhost' keyword. It shoud be something like this:
<iisurl>http://localhost:61230/</iisurl>

3. Replace the localhost name to your ip address. Then save.
4. Now go to the config folder of your IIS Express. (mine is located in Documents > IISExpress > config).
5. Open applicationhost file using notepad.
6. Locate your site name and under bindings remove the word "localhost". Something like this
<binding protocol="http" bindinginformation="*:61230:localhost" /> --> <binding protocol="http" bindinginformation="*:61259:" />

7. Save the file
8. Close the IISExpress in the system tray
9. Run your Visual Studio as administrator

If you view your web app in a browser you'll see that the localhost in the address bar will be replaced by your ip address and you can access it also from other pc.

Hope this helps
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900