Blog

On this page you will find Tutorials, How-Tos and Tips for developing with open bi.

open bi server - Custom HTTP Handler Plugin

The open bi server is extensible with plugins which are .NET DLLs placed in the OPENBI\httpserver\plugins folder. The open bi server is using the ASP.NET Core HTTP.sys server. In this article we are going to explore how to create a plugin for handling arbitrary HTTP requests.

First create a new .NET library for netstandard2.0 and a references to the open bi server files like OPENBI\ibssolution.bioxRepository.exe. Then add a class which implements the Ibssolution.biox.Repositoryserver.IAsyncHttpHandler interface.

The ProcessRequest method is called for all HTTP requests which are not recognized by the open bi server itself and provides access to the current HttpContext.

Check if the context.Request.Path can be handled and if so return true otherwise return false so other custom HTTP handler plugins can try to handle the request.

For debugging add a custom post build event which automatically copies the DLL to the OPENBI\httpserver\plugins folder. Also use the OPENBI\ibssolution.bioxRepository.exe as starting executable. Because the executable needs to be run as administrator make sure to open the IDE with administrator rights.

It is also possible to reference other NuGet packages as well but make sure that these DLLs are copied directly into the OPENBI folder.

Here is the sample code for creating a plugin which also uses dependency injection to get the ILicense from the open bi server.

Bastian Buchholz
Author: Bastian Buchholz
Creation date: 13.07.2021
Category: API
back to overview