Error when enabling production mode

I am deploying my Umbraco 15 site to a hosting provider, where it runs in IIS. Per the documentation, I am trying to enable Production Mode.

As soon as I set the Production Mode setting, the site fails to start and immediately returns an empty HTTP 500 response.

I cannot find any log files, other than some very sparse IIS log.

Can anyone suggest a way to (a) diagnose or ideally (b) fix the issue? My fallback would be to not enable production mode, but this seems to go against the recommended best practice…

At the moment, I am previewing my site over http instead of https, because the domain name has not yet been transferred to the hosting provider and https doesn’t work. In my appsettings.json, UseHttps is set to false, but could it be that this production mode setting overrides that setting and causes the issue?

That is correct, the requirements are noted in the documentation: Runtime Modes | Umbraco CMS

500 errors are usually logged in your webserver logs, as Umbraco can’t boot and therefore can’t start logging.

You can stimulate what will happen on the server by doing a dotnet publish in Release config and trying to run the site like that, you’ll most likely get the same error in your server logs as you would see on the live server.

1 Like

Oh and to note, no Umbraco doesn’t override the setting. It just detects that your settings is wrong for production mode and stops booting.

1 Like

I’m having trouble reproducing this locally, but this must be the issue. Thanks for clarifying Sebastiaan, I wouldn’t have gotten this from just the documentation.

I think we need a solution for that. Umbraco not booting because of runtime checks should be logged! Yes it’s logged in the log on the file system, but we use application insights and it doesn’t log there. It’s a real pain to diagnose Umbraco not booting because of runtime checks.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.