Enable the HTTP Event Collector in Splunk

To send events to Splunk via HTTP posts, enable the HTTP Event Collector functionality on the Splunk Enterprise server.

If you operate your own Splunk server

  1. Log into the Splunk web interface as an administrator
  2. In the Settings menu select Data inputs
  3. Select the HTTP Event Collector link
  4. In the upper right corner click the Global Settings button
  5. To enable the Splunk HTTP Event Collector, click the Enabled button
  6. To use HTTP instead of HTTPS uncheck the Enable SSL checkbox
  7. Click the Save button to save the changes


How to send an event to the Splunk HTTP Event Collector

The Splunk HTTP Event Collector is the preferred way to send events to Splunk.

The Splunk HTTP Event Collector closes the connection if you don’t use HTTPS when you are sending a POST message.

Recv failure: Connection reset by peer

To send the event from the Macintosh Bash terminal

curl -k https://MY_SPLUNK_SERVER_IP:8088/services/collector -H 'Authorization: Splunk MY_TOKEN' -d '{"sourcetype": "json", "event":"Hello, World!", "host":"MY_HOST_NAME"}'

To send the event from Postman

Turn off the SSL Certificate Validation.

If the Splunk server does not have a trusted SSL certificate, Postman will throw an error if you send the message with the mandatory HTTPS protocol. To tell Postman, you trust the SSL certificate generated by the Splunk server, turn off the SSL certificate validation in Postman.

This option is only available in the standalone version of Postman, not in the Chrome add-on

  1. In the upper right corner of Postman click the wrench
  2. Select Settings
  3. On the General tab turn off SSL certificate verification

Create the post

  1. Add your Splunk token to the header
  2. Add the raw, JSON type body


The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

When I made changes to the web.config file of an ASP.Net C# application, I have accidentally deleted a comma, and I started to get the runtime error message:

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Make sure all necessary commas are there in the config files, Visual Studio does not check the format of those lines. In my case, the error was in

<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />

Send Alt-Control-Delete to a Windows server via Remote Desktop

When you log into a Windows server via the Remote Desktop Protocol (RDP) in some cases you need to send the Alt-Control-Delete ( in other notations Alt-Ctrl-Del, Control-Alt-Delete, Ctrl-Alt-Del ) key combination to the remote server.

From a Macintosh laptop

On a Macintosh laptop press the fn+control+option+delete keys to send Alt-Control-Delete to the server.

From a Windows workstation

If the Remote Desktop window is not in full-screen mode, Alt+Control+Delete will control your own Windows workstation.

On a Windows workstation press the Alt+Control+End keys to send Alt-Control-Delete to the remote server.


Connect to a MySQL database from Visual Studio 2017

As of today weI can connect to a MySQL database, but cannot generate the Entity Data Model from a MySQL database in Visual Studio 2017

To access a MySQL database from Visual Studio 2017

IMPORTANT: First install MySQL for Visual Studio, and after that install MySQL Connector/Net.

If MySQL Connector/Net is already installed on your workstation, uninstall it before installing MySQL for Visual Studio and reinstall MySQL Connector/Net.

Install MySQL for Visual Studio

Available version information is at https://dev.mysql.com/doc/visual-studio/en/visual-studio-intro.html

  1. Close all instances of Visual Studio,
  2. Download the installer from https://dev.mysql.com/downloads/windows/visualstudio/
  3. Start the installer
  4. Click the Complete button,
  5. If you select Typical, make sure the Visual Studio 2017 components are selected


Install the MySql Connector/Net the fully-managed ADO.NET driver for MySQL

  1. Download the installer from https://dev.mysql.com/downloads/connector/net/
  2. Download version 6.9.10, because version 6.10.5 throws the

    Inheritance security rules violated by type: ‘MySql.Data.Entity.MySqlEFConfiguration’. Derived types must either match the security accessibility of the base type or be less accessible

    error. More info at https://stackoverflow.com/questions/47227495/inheritance-security-rules-violated-by-type-mysql-data-entity-mysqlefconfigura

  3. Select version 6.9.10, your operating system and click the Download button
  4. If you don’t want to create an Oracle account, click the No thanks… link
  5. Start the downloaded installer
  6. Click the Complete button

Install the NuGet packages

Make sure to install the same version of the NuGet packages as the MySql Connector/Net

Generate Entity Framework Entity Data Model in Visual Studio 2017

Visual Studio 2017 has many project type options, and not all of them support the Entity Framework user interface to generate the Entity Framework Data Model (EDMX) file. If you create an ASP.NET Web Application(.NET Framework) you can add the EDMX file to it. The .NET Core projects do not support the Entity Framework Data Model creation.

For more complex web applications it is good practice to separate the data access layer from the presentation layer. You can even reference the data access project from another solution if that also needs access to the same data.

To be able to use the graphical user interface to generate the Entity Framework Entity Data Model

  1. Add a new Class Library (.NET Framework) type project to the solution,
  2. Right-click the new project and select Add -> New Item
  3. In the Data section select the ADO.NET Entity Data Model
  4. Select EF Designer from database
  5. Continue the process to create the database connection and generate the data model.

Generate the Entity Classes

  1. Open the EDMX file
  2. Right-click the background and select Add Code Generation Item
  3. Select the latest EF DbContext Generator
  4. When the classes have been generated, close the solution and open it again, otherwise, the newly created classes cannot be referenced.

{“error”:”Entity type ‘AspNetUserRoles’ has composite primary key defined with data annotations. To set composite primary key, use fluent API.”}

When a database table has composite keys (multiple columns are in the key) you cannot use the usual key definition

[Display(Name = “UserId”)]
public string UserId { get; set; }

[Display(Name = “RoleId”)]
public string RoleId { get; set; }

When you run the application you get the error message:

{“error”:”Entity type ‘AspNetUserRoles’ has composite primary key defined with data annotations. To set composite primary key, use fluent API.”}

To declare composite keys, in the fluent API format

In the model declare the keys

public class AspNetUserRoles {

    // Composite primary keys
    // Initialized in ApplicationDbContext.OnModelCreating()
    public object UserId { get; internal set; }
    public object RoleId { get; internal set; }

In the ApplicationDbContext file add the lines to the OnModelCreating(ModelBuilder builder) method

// Composite primary key
builder.Entity().HasKey(table => new {



Remove the 2014 Honda CR-V EX center console

There is a great post at http://www.crvownersclub.com/forums/17-interior/152730-2014-center-console-removal.html on the steps to remove the center console of the 2014 Honda CR-V EX by Jepalan. I have copied his description and added my photos to help others in the process.

This is in a 2014 CRV EX that does NOT have NAV, Heated Seats, Factory Amp, or Rear Entertainment System, but should be similar for all models.

You need a taped flat head screwdriver to prevent scratching (or plastic body tools), Phillips head screwdriver, 10 mm socket with extension, pliers, and the usual panel removal tools.

There are 5 bolts (10 mm), one screw (Phillips), and two wire harnesses that need to be disconnected.

Remove front and rear floormats.

Take off the footwell center kick panels in the front of the console on both sides, both have 2 pins and clips. The driver side has a hinge-like flange at the front.

Use a flat head screwdriver to pull out the center of the pins


Driver side


Passenger side


Remove the push-pin on each side revealed at the front of the console after removing the kick panels.


Remove the rear panel of the center console, clips around top and sides.


Remove the two bolts revealed at the rear of the center console.

Open the center console, and by grabbing the small tab at the rear, remove the rubber mat from the bottom, it isn’t attached.

Remove the two 10 mm bolts revealed.

It is not necessary to remove the plastic piece that covers bottom & side inside the center console. If you want to remove it

Remove the black Philips screw at the bottom of the center console.

Lift up the plastic piece.  Do not pry the back, it will slide up.

The 5th bolt is behind a small cover under the shift quadrant, just above the center console cup holders. The cover is held by 4 clips.


The two wiring harness connectors are on the driver side, revealed when the footwell kick panel is removed. They are connected to each other and clipped to the center console. Detach the clip holding them to the console by squeezing the tabs with the pliers, then lift the rear of the console an inch and move the console backward to get at them.

The release catch for the gray is on the top, for the white is between the two connectors. Use a flat head screwdriver to release it.


Once you have everything disconnected, fold the armrests up, then put both seat backs all the way back to make the seats as flat as possible. Move the console toward the rear of the car, then lift up the front and angle it out. The picture below shows the opposite, I moved the console to the front and lifted the rear. That works too.

Reverse the steps to put it back together.

The ham radio restarts when the push to talk button is released

I have installed a new Kenwood TM-281A ham radio in my car. The power is filtered by a Kenwood PG-3B noise filter. When I opened the package of the noise filter, I have noticed some burnt smell but did not pay much attention. The radio transmitted perfectly, but when I released the push to talk button, the radio turned off for a fraction of a second, then turned on again.  When I disconnected the noise filter, the radio started to continuously work again. It is interesting, that a faulty noise filter can supply enough current for the transmission, but cause problems when the current is suddenly reduced.

The sales person at the ham radio store suggested, that most likely the capacitor was faulty. I have returned the noise filter to the store, and when I tested the radio without it, I noticed, that I do not need it for clean, noiseless transmission.

Generate SQL script from Entity Framework migration script

It is not recommended to execute Entity Framework migration scripts in production, It is important that you execute all SQL steps manually on the production database section-by-section to immediately see the result and be able to recover in case a destructive action goes wrong.

The Visual Studio .NET application templates contain Entity Framework migration scripts to set up your local database to match the sample code. To generate the SQL script you can execute by hand on the production database

Install the EF Core .NET Command-line Tools

  1. Open a command window in the folder of the project that contains the database access code
  2. In the command line execute
    dotnet add package Microsoft.EntityFrameworkCore.Design
    dotnet restore
  3. Test the dotnet ef installation with
    dotnet ef


Script the .NET Entity Framework migrations

  1. Open a command window in the folder of the project that contains the database access code
  2. In the command line execute
    1. To generate the SQL script to bring the current development database to the scripted configuration state, use the –idempotent option.
      (Generating idempotent scripts for migration is not currently supported by MySql)

      dotnet ef migrations script --idempotent --output "script.sql" --context MY_DBCONTEXT
    2. To generate the SQL script based on the entire migration script to update the production database to match the template after you have updated the development database
      dotnet ef migrations script --output "script.sql" --context MY_DBCONTEXT