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

前端 未结 3 732
野的像风
野的像风 2021-01-03 08:36

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

相关标签:
3条回答
  • 2021-01-03 09:14

    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 Inetpub\wwwroot 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.

    0 讨论(0)
  • 2021-01-03 09:15

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

    0 讨论(0)
  • 2021-01-03 09:36
    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.
    0 讨论(0)
提交回复
热议问题