multiple sites on IIS7 under the same URL and port but on different directories

不羁岁月 提交于 2019-12-05 12:24:21

If you have the app1 and app2 directories in the inetpub/wwwroot directory, and configure both of them as applications, it should have the effect you desire. Hope this helps...

Have you considered using Virtual Directories? These directories could use different application pools and thus have different maintenence schedules.

Your only other option other than the recommendations above is to use URL rewriting to have IIS translate the incoming URLs.

http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

The question is too old, but I run in the same issue.

Anirudh Ramanathan's answer is correct.

The solution is to add new Application in different ApplicationPools.

Right from Microsoft's documentation:

In the Connections pane, expand the Sites node.

Right-click the site for which you want to create an application, and click Add Application.

In the Alias text box, type a value for the application URL, such as marketing. This value is used to access the application in a URL.

Click Select if you want to select a different application pool than the one listed in the Application pool box. In the Select Application Pool dialog box, select an application pool from the Application pool list and then click OK.

In the Physical path text box, type the physical path of the application's folder, or click the browse button (...) to navigate the file system to find the folder.

Optionally, click Connect as to specify credentials that have permission to access the physical path. If you do not use specific credentials, select the Application user (pass-through authentication) option on the >Connect As dialog box.

Optionally, click Test Settings to verify the settings that you specified for the application.

Click OK.

Complete documentation here

N.B.: "click Test Settings to verify the settings that you specified for the application" may produce an error. According to other SO answers, it seems to be a bug. I ignore this alert and everything run well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!