Custom Health Check API

Posted by natabc23 on 22-Jul-2019 20:10

Hi, I need to create a new help check by api in sitefinity of a access to custom DataBase.

How I can do this?

All Replies

Posted by jread on 23-Jul-2019 00:36
Posted by jread on 23-Jul-2019 00:36
Posted by natabc23 on 23-Jul-2019 16:55

Yes, I do this example but the application return an error "The configuration 'SampleModuleNoImpl_Config_RegHealthCheck' is not registered" when register a new module. So I researched and I found that I register the config with this code in Global.asax:

       protected void Application_Start(object sender, EventArgs e)

       {  Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);      }

       void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)

       {

           if (e.CommandName == "Bootstrapped")

               Config.RegisterSection<SampleModuleNoImpl_Config_RegHealthCheck>();

       }

But this didn't work for me either

Posted by jread on 24-Jul-2019 13:02

SampleModuleNoImpl_Config_RegHealthCheck is the name of the configuration class you build? Does that class inherit from ConfigSection, IHealthCheckConfig? Can you confirm that when the application starts that break point gets get on the line Config.RegisterSection?

Posted by natabc23 on 24-Jul-2019 13:25

Yes, is my Configuration class.

Yes, I have:  public class SampleModuleNoImpl_Config_RegHealthCheck : ConfigSection, IHealthCheckConfig

And, Yes the application is executing this code

Posted by jread on 24-Jul-2019 14:46

So when does the error get thrown? When you try to implement it in the healthcheck config area?

Posted by jread on 24-Jul-2019 14:46

So when does the error get thrown? When you try to implement it in the healthcheck config area?

Posted by natabc23 on 24-Jul-2019 15:31

I get the error when the new module is installing.

This thread is closed