asp.net web api - Why is Serilog(.Extras.)Web's ApplicationLifecycleModule.Init() called twice? -


i'm hosting web api in iis (7.5) application under "default web site", , using several of enrichers serilog.extras.web (i'll upgrading serilogweb.classic package). noticed in logs applicationlifecyclemodule.logrequest() being called twice each request, , i'm trying understand why.

what noticed applicationlifecyclemodule.init() being called twice, registering 2 event handlers.

the first callstack:

serilog.extras.web.dll!serilog.extras.web.applicationlifecyclemodule.init(system.web.httpapplication context) system.web.dll!system.web.httpapplication.registereventsubscriptionswithiis(system.intptr appcontext, system.web.httpcontext context, system.reflection.methodinfo[] handlers) system.web.dll!system.web.httpapplication.initspecial(system.web.httpapplicationstate state, system.reflection.methodinfo[] handlers, system.intptr appcontext, system.web.httpcontext context) system.web.dll!system.web.httpapplicationfactory.getspecialapplicationinstance(system.intptr appcontext, system.web.httpcontext context) system.web.dll!system.web.hosting.pipelineruntime.initializeapplication(system.intptr appcontext) [appdomain transition] 

and second:

serilog.extras.web.dll!serilog.extras.web.applicationlifecyclemodule.init(system.web.httpapplication context) system.web.dll!system.web.httpapplication.initmodulescommon() system.web.dll!system.web.httpapplication.initinternal(system.web.httpcontext context, system.web.httpapplicationstate state, system.reflection.methodinfo[] handlers) system.web.dll!system.web.httpapplicationfactory.getnormalapplicationinstance(system.web.httpcontext context) system.web.dll!system.web.httpapplicationfactory.getapplicationinstance(system.web.httpcontext context) system.web.dll!system.web.httpruntime.processrequestnotificationprivate(system.web.hosting.iis7workerrequest wr, system.web.httpcontext context) system.web.dll!system.web.hosting.pipelineruntime.processrequestnotificationhelper(system.intptr rootedobjectspointer, system.intptr nativerequestcontext, system.intptr moduledata, int flags) system.web.dll!system.web.hosting.pipelineruntime.processrequestnotification(system.intptr rootedobjectspointer, system.intptr nativerequestcontext, system.intptr moduledata, int flags) 

am doing wrong? or bug in applicationlifecyclemodule?


Popular posts from this blog