Failed Ektron Login Attempts Being Logged In Event Viewer

  • Updated

This article discusses the default logging for failed Ektron login attempts and what control a site admin has in that specific logging information on the server.

The default behavior when a failed attempt happens is that this message will be logged in the Event Viewer.

Message: Exception thrown from: /Login/?returnURL=%2f

That username and password combination is not correct. Enter a valid username and password and make sure that your Caps Lock key is not on or off by mistake.

Category: Error
Priority: -1

Some CMS site administrators do not want the messages to appear in the Event Viewer. At this time there is no Ektron settings to suppress this specific message. The information below are additional options for review.

 According to the product documentation the default is that error messages are logged to the event viewer.

LogLevel — Enter a numeric value that determines the level of message logging. By default, diagnostic messages are logged in the Event Log. That is your best chance if possible.

According the the web.config comments, further customization on messaging can be done through the instrumentation.config.  That is located in the site root as well.

Here is the web.config section with comment.

      <!-- Determines the level of messages that are logged
        1 = Error:  Only Errors are logged.
        2 = Warning:  Only warnings and Errors are logged.
        3 = Information:  Only Informationals, Warnings, and Errors are logged.
        4 = Verbose:  Everything is logged.

        NOTE: you can configure where each message level is logged using the instrumentation.config.
      <add name="LogLevel" value="1" />

However if the LogLevel=0 then the Event viewer will not receive any CMS error messages.  This is not advised since it is helpful to see meaningful errors to resolve any issues on the system.

It is by design that if a user is supplying an erroneous username that the error is generated. This cannot be changed as it is compiled in the controls and built into the frameworks.

If Active Directory is leveraged it may be able to pre-check for valid accounts.  

It would be possible to directly query against Active Directory before calling any login code if one is looking to avoid exceptions in the logging by a call to Login.   In this article there is a very simple solution which can be leveraged.

using System.DirectoryServices;

using(var DE = new DirectoryEntry(path, username, password)
        DE.RefreshCache(); // This will force credentials validation
    catch (COMException ex)
        // Validation failed - handle how you want