How to create a virtual directory in IIS7 for ASP.NET?

I have an ASP.NET web site, my machine has IIS7 running on Windows Vista home premium. I want it to be visible to other computers on the LAN.

Do I need to create a virtual directory? How can I create a virtual directory on my machine? How do I have to deploy it for others to see my web application?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Here: http://msdn.microsoft.com/en-us/library/ms178477.aspx#

Method 2

If you want to run a web site on a workstation like Windows Vista, the simplest thing you can do is copying (or creating) your application files in a subfolder of the Inetpubwwwroot directory.

If your application files are not in a subfolder of wwwroot, you can create a virtual directory pointing to your project folder. Make sure that this virutal directory has execution permission and is created as an application. Here is a good tutorial about how to create IIS applications and virtual directories.

Then you should be able to access the site from other computers using your computers name like this:

http://YourComputersName/YourAppName/

You should check Vista’s firewall settings. Allow port 80 for incoming requests. Also check, if the name of your workstation is known to other PCs (try nslookup or ping). If the name is not known to other computers, you should be able to see the site using your computer’s IP address (example):

http://192.168.99.99/YourAppName/

Consider that Windows workstations are limited to 10 incoming connections.

Method 3

  1. Make sure that the hostheaders are added in IIS. You want your IP and your computer name added with port 80 assigned.
  2. Make sure your firewall lets through port 80.
  3. Your friends can now surf on to your site using ip or computer name.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x