Deploy to Azure 500.30 error

Hello - I am using Radzen 2.62.4 and am getting a HTTP Error 500.30 - ASP.NET Core app failed to start error after Radzen says the deploy was successful. I previously had deployed a couple different Radzen projects to Azure using Azure SQL, including a previous version of this project. I also created a new project and inferred the same Azure database to create new crud pages, and it deploys just fine. My application also runs perfectly via Radzen and Visual Studio.

Any ideas? Error and other info is below.

HTTP Error 500.30 - ASP.NET Core app failed to start
Common solutions to this issue:
The app failed to start
The app started but then stopped
The app started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265

I followed this link to troubleshoot, and get the following error.

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Radzen.Blazor, Version=3.9.6.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'Radzen.Blazor, Version=3.9.6.0, Culture=neutral, PublicKeyToken=null'
   at OrderBahn.Startup.ConfigureServices(IServiceCollection services)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at OrderBahn.Program.Main(String[] args) in C:\Users\XXXXX\Documents\XXXXXXDevelopment\CurrentProject\XXXOrderBahn\server\Program.cs:line 18

I confirmed that I am running .NET 5, and since my other projects deploy just fine, I dont think the issue is with the Azure app service. I did delete and re-create it a couple of times while troubleshooting though.

The exception says that Radzen.Blazor assembly cannot be loaded. I see similar issues reported on StackOverflow:
c# - Could not load file or assembly after publishing to Azure app service - Stack Overflow.

Have you tried Copy Local property to True?

I located the Radzen.Blazor package and dll and tried going to properties and do not see the option to set the Copy Local property.

Yes, I just realized that this is definitely old suggestion related to assemblies but not for NuGet packages. I'm afraid that I've never seen such error before and I don't have any other suggestions. Try to deploy the application to ZIP from Radzen, extract the zip locally and make sure it's running properly with dotnet appname.dll and after that copy manually to your Azure the ZIP content.

I just deployed to zip and ran it and I am getting the same error. I ended up telling the Radzen package to update, so now it says 3.9.7.0. I will need to pick up trying to deploy to Azure manually in the morning, but I suspect it wont work if it wont run locally.

dotnet OrderBahn.dll
Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Radzen.Blazor, Version=3.9.7.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'Radzen.Blazor, Version=3.9.7.0, Culture=neutral, PublicKeyToken=null'
   at OrderBahn.Startup.ConfigureServices(IServiceCollection services)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at OrderBahn.Program.Main(String[] args) in C:\Users\danwa\Documents\Empire Development\CurrentProject\BenOrderBahn\server\Program.cs:line 18

I've just tried new .NET 5 Blazor server application with CRUD pages from our sample database using latest Radzen and everything worked normally:

Deploy to ZIP:

Extract and run:



Got it working by using the publish function in Visual Studio and under the Publish settings selecting the "Remove additional files at destination". Well, I guess I cant say with 100% certainly since I hadnt tried publishing in Visual Studio yet. Previously I was only using the deploy in Radzen.

Click here

image

I then followed these instructions to deploy via the Kudu UI by zipping up the files from the VS publishing and dragging into the interface. I deleted all the files first in Azure.

Run your app in Azure App Service directly from a ZIP package

Figured it would be helpful in case someone else has this issue. I dont have time this week to circle back and isolate it further, but I do want to understand what the actual issue was and will post back if I find anything.

1 Like