即使定义了 2 个站点,IIS Express 7.5 也仅加载一个站点?

发布于 2024-11-30 20:40:23 字数 1570 浏览 1 评论 0原文

我已经从命令行条目加载并运行了 IIS Express。我正在使用默认的 applicationhost.config 文件(我知道这是正确的文件,因为我已经更改了第一个站点的端口几次等)。

奇怪的是,我定义了两个站点,但似乎只加载了第一个站点?我确信 IIS Express 可以加载多个站点,对吗?只要不同端口?

以下是 applicationhost.config 文件中的 定义位:

<sites>
    <site name="BF Local SVN" id="1">
        <application path="/" applicationPool="Clr4IntegratedAppPool">
            <virtualDirectory path="/" physicalPath="C:\_CODE SOURCECONTROL\BizzfaceLocalSVN" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:6464:localhost" />
        </bindings>
    </site>
    <site name="SquirrelITfreeformBS" id="2">
        <application path="/" applicationPool="Clr4IntegratedAppPool">
            <virtualDirectory path="/" physicalPath="C:\_CODE SOURCECONTROL\SquirrelITfreeformBS" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:6465:localhost" />
        </bindings>
    </site>
    <siteDefaults>
        <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
        <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
    </siteDefaults>
    <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
    <virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>

如您所见,定义了两个站点,不同的站点 ID 和不同的端口?

有什么想法吗?

I have IIS express loaded and running from a command line entry. I am using the default applicationhost.config file (I know it's the correct file as I have changed the 1st site's port a couple of times etc).

The strange thing is, I have two sites defined, and it appears only the first one gets loaded? I am sure IIS express can load multiple sites right? as long as different ports?

Here is the <sites> definition bit from the applicationhost.config file:

<sites>
    <site name="BF Local SVN" id="1">
        <application path="/" applicationPool="Clr4IntegratedAppPool">
            <virtualDirectory path="/" physicalPath="C:\_CODE SOURCECONTROL\BizzfaceLocalSVN" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:6464:localhost" />
        </bindings>
    </site>
    <site name="SquirrelITfreeformBS" id="2">
        <application path="/" applicationPool="Clr4IntegratedAppPool">
            <virtualDirectory path="/" physicalPath="C:\_CODE SOURCECONTROL\SquirrelITfreeformBS" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:6465:localhost" />
        </bindings>
    </site>
    <siteDefaults>
        <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
        <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
    </siteDefaults>
    <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
    <virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>

As you can see, two sites defined, different site ID's and different ports?

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁年轻赶紧闹 2024-12-07 20:40:23

当您从命令行运行 iisexpress.exe(不带任何命令行参数)时,它将启动默认 applicationhost.config 文件 (%userprofile%\documents\iisexpress\config\applicationhost.config) 中给定的第一个站点。

要启动多个站点,请使用 /apppool 开关,如下所示;

iisexpress.exe /apppool:Clr4IntegratedAppPool

上面的命令将启动所有使用“Clr4IntegratedAppPool”应用程序池的应用程序。

When you run iisexpress.exe from command line (without any command line arguments), it starts the first site given in default applicationhost.config file (%userprofile%\documents\iisexpress\config\applicationhost.config).

To start multiple sites, use /apppool switch as shown below;

iisexpress.exe /apppool:Clr4IntegratedAppPool

Above command would start all the applications that are using 'Clr4IntegratedAppPool' app pool.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文