On Azure AppServices, the following AzureAppServices exception is logged on startup
See original GitHub issueDescribe the bug
Microsoft.AspNetCore.AzureAppServices.HostingStartup failed to execute. See the inner exception for more details. <— Could not load file or assembly ‘Microsoft.AspNetCore.AzureAppServices.HostingStartup, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
To Reproduce
Deploy ASPNET Core 3.0 App to App Services
Expected behavior
Not throw an exception?
Additional context
This has been an upgrade from 2.2, potentially some config is not correct?
System.InvalidOperationException: Startup assembly Microsoft.AspNetCore.AzureAppServices.HostingStartup failed to execute. See the inner exception for more details.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.AzureAppServices.HostingStartup, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.AzureAppServices.HostingStartup, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.ExecuteHostingStartups()
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Troubleshoot ASP.NET Core on Azure App Service and IIS
In the Azure portal, open the app in App Services. Select Diagnose and solve problems. Select the Diagnostic Tools heading. Under Support Tools, ......
Read more >c# - .net 5 logging to azure app service protocol stream not ...
To enable the logs, In Azure portal go to App service -> App Service Logs. Enable the Application Logging (Filesystem).
Read more >Azure App Service — Troubleshooting HTTP Error 500.30
There is another option to see the exception, you have to open Diagnose and solve problems > Diagnostic Tools > Application Event Logs:....
Read more >Microsoft.AspNetCore.AzureAppServices.HostingStartup ...
I am getting the following error in my logs when releasing to a testing ... InvalidOperationException: Startup assembly Microsoft.
Read more >Where to Find Azure App Service Logs for Your App, IIS, ...
Review of the types of Azure App Service logs and how to access them. Find how to access app logs, IIS logs, event...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For folks on this thread, I’m reposting @anurse’s comment on a duplicate thread as a workaround till we fix our site extension
I have a workaround you can try, since all the Site Extension does is configure a special logging component (which is already on NuGet):
Add a package reference to
Microsoft.AspNetCore.AzureAppServicesIntegration
with the same major-minor version as ASP.NET Core (i.e. 3.0 or 3.1).Call
.UseAzureAppServices
on yourIWebHostBuilder
. If you are using WebHost (i.e. you have a call toWebHost.CreateDefaultBuilder()
in yourProgram.cs
, then just add it to that:If you are using generic host (recommended in 3.0+), then this goes in your
ConfigureWebHostDefaults
call:Closing as this should be resolved in 3.1.4 (this is a duplicate of https://github.com/dotnet/aspnetcore/issues/20617).
3.1.4 should be releasing shortly. If that doesn’t resolve the issue, feel free to comment and/or open a new issue!