Programmatically register HttpModules at runtime

前端 未结 5 1788
深忆病人
深忆病人 2020-12-02 11:29

I\'m writing an app where 3rd party vendors can write plugin DLLs and drop them into the web app\'s bin directory. I want the ability for these plugins to be able to registe

5条回答
  •  旧时难觅i
    2020-12-02 11:49

    This worked for me for dynamic registration.

    RegisterModule(typeof(RequestLoggerModule));
    
    public class RequestLoggerModule : IHttpModule
        { ... }
    

    https://docs.microsoft.com/en-us/dotnet/api/system.web.httpapplication.registermodule?view=netframework-4.7.2

提交回复
热议问题