azureasp.net-core.net-core-3.0asp.net-core-3.0

ASP.NET Core 3 and 500.30 In-Process Startup Failure


My service targets the following frameworks:

Everything runs fine locally. When I deploy to an App Service in Azure, I experience the following error:

500.30 In-Process Startup Failure

Reading the documentation tells me perhaps these frameworks are not on the machine hosting my service. However I checked what frameworks are installed on the machine by running dotnet --info on the App Service's console, giving me the following results:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.109
 Commit:    586f23c400

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x86
 Base Path:   D:\Program Files (x86)\dotnet\sdk\2.2.109\

Host (useful for support):
  Version: 3.0.0
  Commit:  7d57652f33

.NET Core SDKs installed:
  1.1.14 [D:\Program Files (x86)\dotnet\sdk]
  2.1.509 [D:\Program Files (x86)\dotnet\sdk]
  2.1.701 [D:\Program Files (x86)\dotnet\sdk]
  2.2.108 [D:\Program Files (x86)\dotnet\sdk]
  2.2.109 [D:\Program Files (x86)\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.12 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.13 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.6 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.7 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.12 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.13 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.6 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.7 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.16 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.13 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.12 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.13 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.6 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.7 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Clearly both my targeted frameworks exist on the machine.

Here is (partial) proof my files are deployed:

Deployed files for my app service

Here is my start up file (nothing unusual):

    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        public void ConfigureServices(IServiceCollection services)
        {
            services.AddCors();
            services.AddControllers();
        }

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseCors();

            app.UseRouting();
            app.UseEndpoints(endpoints => {
                endpoints.MapControllers();
            });
        }
    }

What am I doing wrong? Why am I getting this error?

Here are some event logs if they help:

<Events>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:18:07Z"/>
            <EventRecordID>622276312</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=050F22D8 [TID 2092] [PID 5816]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="ZipFS"/>
            <EventID>0</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:18:15Z"/>
            <EventRecordID>622284390</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Failed to open siteversion.txt. ZipFS setup failed. Error: 0x80070003</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:18:22Z"/>
            <EventRecordID>622291296</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=0596E698 [TID 3800] [PID 5152]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1018</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:20:13Z"/>
            <EventRecordID>622401953</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.</Data>
            <Data>Process Id: 5988.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1007</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:20:13Z"/>
            <EventRecordID>622401968</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' failed to load clr and managed application. CLR worker thread exited prematurely</Data>
            <Data>Process Id: 5988.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:21:17Z"/>
            <EventRecordID>622466890</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=04F7E110 [TID 6744] [PID 5988]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:21:19Z"/>
            <EventRecordID>622467953</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=05CBC280 [TID 12796] [PID 12656]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1018</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:21:42Z"/>
            <EventRecordID>622491921</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.</Data>
            <Data>Process Id: 2940.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1007</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T10:21:42Z"/>
            <EventRecordID>622491937</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' failed to load clr and managed application. CLR worker thread exited prematurely</Data>
            <Data>Process Id: 2940.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T11:06:27Z"/>
            <EventRecordID>625176281</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=055FA240 [TID 12556] [PID 7444]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T11:07:41Z"/>
            <EventRecordID>625250078</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=059F8DE0 [TID 12108] [PID 2940]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1018</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:27:39Z"/>
            <EventRecordID>630047968</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.</Data>
            <Data>Process Id: 13184.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1007</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:27:39Z"/>
            <EventRecordID>630047968</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' failed to load clr and managed application. CLR worker thread exited prematurely</Data>
            <Data>Process Id: 13184.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:28:20Z"/>
            <EventRecordID>630089140</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=05284660 [TID 7644] [PID 13184]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1018</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:28:35Z"/>
            <EventRecordID>630104687</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.</Data>
            <Data>Process Id: 5864.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="IIS AspNetCore Module V2"/>
            <EventID>1007</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:28:35Z"/>
            <EventRecordID>630104703</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application '/LM/W3SVC/1682960519/ROOT' with physical root 'D:\home\site\wwwroot\' failed to load clr and managed application. CLR worker thread exited prematurely</Data>
            <Data>Process Id: 5864.</Data>
            <Data>File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:37:24Z"/>
            <EventRecordID>630633328</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=058C0638 [TID 12688] [PID 6308]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:37:24Z"/>
            <EventRecordID>630633515</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=04F81128 [TID 12484] [PID 5864]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:41:31Z"/>
            <EventRecordID>630880156</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=051807A0 [TID 12196] [PID 11416]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:41:31Z"/>
            <EventRecordID>630880734</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=05841840 [TID 10740] [PID 2296]</Data>
        </EventData>
    </Event>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>2000</EventID>
            <Level>4</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2019-10-15T12:41:45Z"/>
            <EventRecordID>630894312</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD281878C98595</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=05C64508 [TID 4484] [PID 7868]</Data>
        </EventData>
    </Event>
...more events here
</Events>

Solution

  • Turns out I was also referencing Microsoft.AspNet 2.2 NuGet package, which doesn't play well with ASP.NET Core 3.0. Removing that dependency resolved my issue.