开发者

IIS express 7.5 only loading one site even though 2 sites defined?

开发者 https://www.devze.com 2023-03-29 13:04 出处:网络
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 ti

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="*:6开发者_StackOverflow464: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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消