Hey Community,
I developed a module for DNN 7.x which writes with help of a dnn webservice (stored in folder dnnroot\bin) data into a database. This module works - so far - fine.
Now I like to trace/log every request which arrives the webservice with help of HTTP Message Handlers. I tried a lot of different opportunities to add a new handler, but without success. Because i am not sure how to do it. The tutorial explains to extend the method register, but this method doesnt exist. I think i can use RegiserRoutes as well?!
At the moment my idea is the following code in the RouterMapper.cs // The class LoggingHandler() is existing.
using System;
using System.Web.Http;
using DotNetNuke.Web.Api;
namespace Lifbi.Services.Password {
public class RouteMapper : IServiceRouteMapper {
public void RegisterRoutes(IMapRoute mapRouteManager) {
GlobalConfiguration.Configuration.MessageHandlers.Add(new LoggingHandler());
mapRouteManager.MapHttpRoute("modulename", "default", "{controller}/{action}", new[] { "namespace" });
}
}
}
The problem is: the name "GlobalConfiguration" is in the acutal context not available.
Maybe someone can help me, please. Thanks.