Reputation: 1066
I'm trying to run two applications on the one site, in IIS Express. The relevant part of my applicationhost.config
shows them both configured to use different application pools:
<site name="Example" id="1" serverAutoStart="true">
<application path="/" applicationPool="ParentAppPool" preloadEnabled="true">
<virtualDirectory path="/" physicalPath="C:\Path\To\ParentApp" />
</application>
<application path="/child" applicationPool="ChildAppPool">
<virtualDirectory path="/" physicalPath="C:\Path\To\ChildApp" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:dev.example.com" />
<binding protocol="https" bindingInformation="*:443:dev.example.com" />
</bindings>
</site>
The "parent" app works fine, but on browsing to /child
, I get a 500.35
error:
ASP.NET Core does not support multiple apps in the same app pool
Only one in-process application is allowed per IIS application pool. Please assign the application '/LM/W3SVC/1/ROOT/child' to a different IIS application pool.
Both apps are set to use different app pools, and nothing else is using either of these app pools.
If I enable traceFailedRequestsLogging
, then the log files show that requests going to https://dev.example.com:443/
and those going to https://dev.example.com:443/child/
are using the same processId
, and both are recorded as using the first application's app pool: appPoolId="ParentAppPool"
Both of these app pools are specified in applicationhost.config
:
<add name="ParentAppPool" managedRuntimeVersion="" managedPipelineMode="Integrated" autoStart="true" />
<add name="ChildAppPool" managedRuntimeVersion="" managedPipelineMode="Integrated" autoStart="true" />
If I change the parent app to specify an undefined app pool, I get an error about a catastrophic failure.
If I instead change the child app to specify an undefined app pool, I don't get this error, and things behave the same as before.
This leads me to the conclusion that all applications under a site are forced by IIS Express to use the same app pool, even though this causes them to fail.
Is there a way to work around this?
Upvotes: 0
Views: 19