Upgrade from 12.2 to 13.5.1 ASP.NET Core app faile...
# help-with-umbraco
b
I updated an Umbraco site from v12.2 to v13.5.1 On my local machine everything works like it should. I published the database and the projectname.dll to my server and I restarted the app pool and site in IIS and I get the "HTTP Error 500.30 - ASP.NET Core app failed to start". There's nothing in the Umbraco logs. I turned on stdout in the web.config and nothing is produced there. Note: in my server's Event Viewer I see "hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information."
r
Does the server have dotnet 8 installed?
b
ya know...that's a valid question...lemme check
@Rachel D 8.0.1 runtime is installed
r
Hm, I'm not sure then 🤔 Normally when I get an IIS error like that, it's a malformed web.config, or the IIS rewrite module isn't installed, or something along those lines. But I don't think that would have changed at all between 12 and 13
b
@Rachel D thx! I'll keep trying. I usually get this error when I forget to deploy the database. It's something different this time...not sure what yet. I'm surprised stdout didn't catch a more informative error.
I assume the Hosting Bundle from https://dotnet.microsoft.com/en-us/download/dotnet/8.0 has been installed as well.
b
@Sebastiaan I have other v13+ sites running on this server already. The app pool had 32-bit set to false. I changed that to true and recycled it. Still same error message. Yes the hosting bundle is installed.
I have erros in stdout now... Unhandled exception. System.IO.DirectoryNotFoundException: C:\RedactedMyLocalFilePathRedacted\wwwroot\ at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.b__1_0(String contentRoot) at Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c.b__10_0(WebHostBuilderContext context, IConfigurationBuilder configBuilder) at Microsoft.AspNetCore.Hosting.WebHostBuilderBase.<>c__DisplayClass4_0.b__0(HostBuilderContext context, IConfigurationBuilder builder) at Microsoft.Extensions.Hosting.HostBuilder.InitializeAppConfiguration() at Microsoft.Extensions.Hosting.HostBuilder.Build() at Umbraco.Cms.Web.Common.Hosting.UmbracoHostBuilderDecorator.Build() at renderlegacytrail.com.Program.Main(String[] args) in C:\RedactedMyLocalFilePathRedacted\Program.cs:line 6
I updated my program.cs to match a clean install of umbraco 13.5.1 program.cs ... still same error
New stdout error message now... Unhandled exception. System.IO.DirectoryNotFoundException: C:\RedactedMyLocalFilePathRedacted\wwwroot\ at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.b__1_0(String contentRoot) at Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c.b__10_0(WebHostBuilderContext context, IConfigurationBuilder configBuilder) at Microsoft.AspNetCore.Builder.ConfigureWebHostBuilder.ConfigureAppConfiguration(Action`2 configureDelegate) at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStaticWebAssets(IWebHostBuilder builder) at Umbraco.Extensions.WebApplicationBuilderExtensions.CreateUmbracoBuilder(WebApplicationBuilder builder) at Program.$(String[] args) in C:\RedactedMyLocalFilePathRedacted\Program.cs:line 22 at Program.(String[] args)
s
Seems like you deleted wwwroot 😅
b
@Sebastiaan afraid not. I got tired of fighting it. I completely blew away the version of the site on my server and republished and that fixed it. It's not the first time I've had to do that. I was surprised that I had to complete the upgrade process again on the server after I'd already completed that on my local, but se la vie it's working...thanks @Sebastiaan and @User .
s
gussing your database on local was upgraded but the db on the server wasn't, so you'd have to run it again indeed
b
@Sebastiaan I copied the database from my local to my server...doesn't make much sense.
s
Yeah I don't know, the upgrade installer only kicks in when the newest migration in the Umbraco dlls is lower than the latest migration stored in your database.
n
Depending on how you are deploying your site, it might have left legacy DLL's in place, Web Deploy (Unless explicitly told) won't delete things, and I think that is the same with alot of deployment methods. I suspect the reason it's working now is that you cleared a legacy DLL that was conflicting or something like that 🙂
k
We always clear everything on deploy. A stray DLL can wreak all kinds of unpredictable hardtofindable havoc. For Azure web app deploys using the ootb "remove additional files" setting it does mean deleting all index files and possible some other stuff you might want to keep though.
b
I've been around Umbraco since v6 and built a couple hundred Umbraco sites...we rarely own our sites long enough to warrant an upgrade...so it's a new process to me...I thought I could get away with deploying projectname.dll and the database. Apparently not. I'll be honest I didn't know I needed to blow away all the DLLs from the server and redeploy them...I'm getting ready to upgrade my next 12.2 site I'll try that. Thanks @Nik and @kdx-perbol
So for the next update I blew away all of the DLLs on the server and copied everything from my bin/release/net8.0/ to the server root folder...same "ASP.NET Core app failed to start" error... Guess I gotta publish the whole site from local to server...I was hoping to avoid that...guess there's no way around it
k
If you start the web project manually (just run the executable) or enable aspnet stdout logging you can see the startup error. Did you check the .net version on the app (if Azure) and the application pool setttings (if IIS)?
s
@bh To be fair, it has always been a problem if you left behind old dlls, even on .NET Framework. The advise has always been to delete everything in the bin folder at least and deploy that. It might have been a little more forgiving on .NET Framework, but that's also why it was a lot easier to get in trouble. Now that Microsoft has made it more strict, there is definitely extra fricition, but we are now "helped" in making our deployment process better so that it's harder to get yourself into trouble.
96 Views