IIS - how to host multiple applications on the same IIS7 in windows 7

Asked By venkat s on 30-Jan-12 02:36 AM
I would like to host multiple applications on the same IIS. The problem is I need to use the same URL like www.example.com, but different directories. Also the port needs to be 80, or at least transparent to the end user, so I'd like to have something like his:
 
www.example.com/app1
 
www.example.com/app2
 
The problem is IIS does not let me create 2 sites with the same domain and the same port and I don't wanna use subdomains if possible.
 
Both apps should not be on the same site since they are separate applications with different mantainance schedules.
 
Is there a way to do this? Or do I have to use subdomains?

Thanks
kalpana aparnathi replied to venkat s on 30-Jan-12 02:40 AM
Web Star replied to venkat s on 30-Jan-12 02:45 AM
you can create multiple virtual directory for multiple application on same IIS for hosting multiple applicaiton with same IIS
smr replied to venkat s on 30-Jan-12 03:34 AM

hi

You need to configure each website to respond to the correct host header. This will enable you to serve both sites on the same port on the same server.
For example www.domain1.com and www.domain2.com. If you only have one domain, you can specify a different host name (e.g. site1.domain.com and site2.domain.com).

In IIS7 you set the host name in the site bindings dialog box.

Step by step instructions:

  1. Open Control Panel

  2. Open Administrative Tools

  3. Launch Internet Information Services (IIS) Manager (Note: Do not open the 6.0 Manager.)

  4. In the connections pane, twirl open the tree until you see the website you've created previously

  5. Select the site

  6. In the Actions pane, click the Bindings link

  7. Select the binding you want to edit

  8. Click on the Edit button

  9. Add the appropriate host name (e.g. site.domain.com; do not include http:// )

  10. Click on OK, then Close

follow
http://msdn.microsoft.com/en-us/library/ff648634.aspx
http://weblogs.asp.net/owscott/archive/2010/01/26/iis-url-rewrite-hosting-multiple-domains-under-one-site.aspx

Jitendra Faye replied to venkat s on 30-Jan-12 03:39 AM
You can create sub virtaul directory for this-

By default all \wwwroot folders are already configured as application directories. This allows your asp.net applications to run from \wwwroot\bin. 

But if you try to run a asp.net application from a sub-folder ie: \wwwroot\testapp1\bin, this application will likely fail because the \testasp1 directory is not setup as a application/virtual directory.

To make a sub-folder a application/virtual directory, follow these steps:

  1. goto the Helm control panel and find your domain. 
  2. Then goto the 'Virtual Directories' icon and then click add new 
  3. enter the name of your sub-folder in the Virtual Directory Name textbox  ie: testapp1
  4. select the Physical Folder and click ok. You should see \testapp1
  5. click save

Try this and let me know.

Jitendra Faye replied to venkat s on 30-Jan-12 03:43 AM
You can create sub virtaul directory for this-

By default all \wwwroot folders are already configured as application directories. This allows your asp.net applications to run from \wwwroot\bin. 

But if you try to run a asp.net application from a sub-folder ie: \wwwroot\testapp1\bin, this application will likely fail because the \testasp1 directory is not setup as a application/virtual directory.

To make a sub-folder a application/virtual directory, follow these steps:

  1. goto the Helm control panel and find your domain. 
  2. Then goto the 'Virtual Directories' icon and then click add new 
  3. enter the name of your sub-folder in the Virtual Directory Name textbox  ie: testapp1
  4. select the Physical Folder and click ok. You should see \testapp1
  5. click save

Try this and let me know.