在同一域名下托管2个IIS站点 [英] Host 2 IIS sites under same domain name

查看:268
本文介绍了在同一域名下托管2个IIS站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SharePoint 2010网站和一个自定义Web应用程序。最终目标是能够使用跨站点JavaScript。他们使用不同的.net框架,因此需要单独的IIS站点。
如何在 http://website.com http://website.com/site2

I have a SharePoint 2010 site and a custom web application. End goal is to be able to use cross-site JavaScript. They use different .net Frameworks so need to be separate IIS sites. How can I host both under http://website.com and http://website.com/site2 for example?

我试过在里面使用一个网站另一个是使用不同应用程序池的应用程序,但由于需要重复引用而导致web.config文件出现问题。

I have tried using one site inside the other as an application using a different application pool but have issues with the web.config files because of the duplicate references needed.

推荐答案

尝试为/ site2站点创建一个新的应用程序池。然后将App Pool属性enableConfigurationOverride设置为false。这只能在appcmd中完成,或者通过手动编辑IIS Config文件来完成。 Appcmd命令是这样的:

Try and create a new app pool for the /site2 site. Then set the App Pool attribute enableConfigurationOverride to false. This can only be done in appcmd or by editing the IIS Config file manually. Appcmd command is this:

appcmd.exe set config -section:system.applicationHost/applicationPools /[name='AppPoolName'].enableConfigurationOverride:"False" /commit:apphost

这将告诉子站点应用程序池不导入来自父web.config的任何设置。

This will tell the sub site app pool to not import any settings from the parent web.config.

我能够使用此配置在SharePoint站点下运行MVC站点。

I was able to run a MVC site underneath a SharePoint site with this configuration.

这篇关于在同一域名下托管2个IIS站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆