9
votes

I have ASP.NET Core applications hosted on Azure App Services as two virtual applications in the same App Services instance. The main site app is hosted at / and the blog application at /blog. I would like to use AspNetCoreModuleV2 with the InProcess hosting model. However, it fails to start up and I see this error in the event log:

<Event>
<System>
<Provider Name="IIS AspNetCore Module V2"/>
<EventID>1008</EventID>
<Level>1</Level>
<Task>0</Task>
<Channel>Application</Channel>
...
</System>
<EventData>
<Data>
Only one inprocess application is allowed per IIS application pool. Please assign the application '/LM/W3SVC/170746742/ROOT/api' to a different IIS application pool.
</Data>
<Data>Process Id: 20236.</Data>
<Data>
File Version: 12.2.18296.0. Description: IIS ASP.NET Core Module V2. Commit: 61f1a70784dc0a32cf98f8ddd169c0293b0390ab
</Data>
</EventData>
</Event>

How can I run multiple virtual applications in App Services using the InProcess hosting model?

1

1 Answers

7
votes

Nope. The error info in the event log has answered,

<EventData> <Data> Only one inprocess application is allowed per IIS application pool. Please assign the application '/LM/W3SVC/170746742/ROOT/api' to a different IIS application pool. </Data>

In your scenario for running multiple virtual applications in the same Azure WebApp, only one app can run in the hosting model as in-process, others can be configured in web.config file as out-of-process via Kestrel , as below, please see more details at here ASP.NET Core Module.

Note: hostingModel="OutOfProcess"

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" 
                  arguments=".\MyApp.dll" 
                  stdoutLogEnabled="false" 
                  stdoutLogFile=".\logs\stdout" 
                  hostingModel="OutOfProcess" />
    </system.webServer>
  </location>
</configuration>