How to fix 500.30 - ASP.NET CORE app failed to start
12,496
Solution 1
Which Core version are you using? And what Hosting Model you are using? IN Of Process or Out of Process? You can check thios in you csproj file. if you using In of Process, try to change it to
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
Solution 2
We've just encountered this with .net core 6.0.1. The issue turns out to be that our server had both the 64bit and 32bit versions of ASP.NET Core 6.0.1 Shared Framework installed. We removed the 32bit version, rebooted the server, sent a stern email to our server team and all worked fine ;-)
Related videos on Youtube
Author by
mohammad rahimi
my name is mohammad Iam asp.net core back end developer
Updated on June 04, 2022Comments
-
mohammad rahimi almost 2 years
Well after publishing the program on IIS, we have this error
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
After we check stdout log file, this Error appears
at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration() at Microsoft.Extensions.Hosting.HostBuilder.Build() at ArtanNet.Program.Main(String[] args) in C:\Users\Administrator\Desktop\ArtanNet\ArtanNet\Program.cs:line 16
program.cs file code is:
public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }); }
web.congig:
<?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=".\ArtanNet.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" /> </system.webServer> </location> </configuration> <!--ProjectGuid: d6cea5f9-6e6d-4f03-b6e9-1d0fb599d508-->
and now please help us to fix this error
-
marc_s about 3 yearsCheck the system event log for error messages - well - did you? What did it tell you?
-
Lex Li about 3 years“The app started but threw an exception during startup” and "FileConfigurationProvider.HandleException" are clear indicators of the cause.
-
John Wu about 3 yearsSeems like it having trouble reading the configuration file. Make sure it is present and contains well-formed XML.
-
Bruce Zhang about 3 yearsHave you tried to create a new empty core application and published on IIS? And please post web.config so that I can check the format of XML code.
-
Mahmudul Hasan almost 3 yearsFacing the same error. My app works on my machine perfectly in both debug and release mode. Bud doe not if I uploaded it to the server.
-
-
mohammad rahimi about 3 yearsDotnet version : 5.0.103 hosting model:ìn process
-
fuzzy_logic almost 2 yearsJust FYI - there's a trade off for changing it, as per MS doco. "In-process hosting provides improved performance over out-of-process hosting because requests aren't proxied over the loopback adapter".