Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Onno Sloof 13 posts 84 karma points
    Jan 28, 2020 @ 10:44
    Onno Sloof
    0

    Umbraco 8 Dashboard error?

    Hi,

    Every time I open the Umbraco Backend of my site, two errors are logged.

    Umbraco Error 1

    and

    Umbraco Error 2

    I think these are not very heavy errors, and everything is working fine, but it's better-looking to have no errors at all in the log. How can I fix this?

  • Matt Barlow | jacker.io 164 posts 740 karma points c-trib
    Jan 28, 2020 @ 11:31
    Matt Barlow | jacker.io
    0

    There are a few reasons for this, but this is commonly fixed by adding the follow code to the application start event:

    if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
            {
                ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
            }
    

    The way of registering application started/starting events has changed in V8 though.

    See here:

    https://our.umbraco.com/documentation/reference/events/application-startup

    So I think you should add the following to your own compositions class:

    using System.Net;
    using Umbraco.Core.Composing;
    
    namespace YourNameSpace.Compositions
    {
        public class ApplicationComposer : ComponentComposer<ApplicationComponent>, IUserComposer
        {
            public override void Compose(Composition composition)
            {
                // ApplicationStarting event equivalent: add IContentFinders, register custom services and more here
                base.Compose(composition);
            }
        }
    
        public class ApplicationComponent : IComponent
        {
            public void Initialize()
            {
                if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
                {
                    ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
                }
            }
    
            public void Terminate()
            { }
        }
    }
    
  • Onno Sloof 13 posts 84 karma points
    Jan 29, 2020 @ 09:21
    Onno Sloof
    0

    Hi Matt,

    Thank you so much for your input. I added the suggested class and also tried several possibilities from the other article, but unfortunately without success. The error continues to appear in the log at the first time I arrive at the Umbraco Welcome dashboard after opening the backend in a browser. It seems that the error does indeed only occur after Umbraco has restarted, for example by an app pool reset or a change in code / web.config.

Please Sign in or register to post replies

Write your reply to:

Draft