Turn off EventLogProvider from store update/delete/insert activity in Kentico

The event log stores information about all events that occur in the system. It is useful to view logged information if unwanted behavior occurs in the system and you want to find out where the problem originates or get additional details.

But, some activities you don't want to be stored in the database while you are developing a custom web part. This is the way how to turn off the for a while in your custom code block.

Step by Step

  1.  Add "using CMS.Base;"
  2. Wrap your code block with this using block code.

    using (CMSActionContext ctx = new CMSActionContext())
    {
        ctx.LogEvents = false;
       //your action here.

}

So anything code you put under the comment "Your action" will not be recorded in the Event Log table.

Have a try.

Popular posts from this blog

How to create zip file to download in JSP- Servlet

How to create DataGrid or GridView in JSP - Servlet

Pinging in ASP.NET Example