Base solution for your next web application
BLACK FRIDAY
From Nov 21
To Dec 1
XXDAYS : XXHRS : XXMIN : XXSEC
SAVE UP TO$3K
Also valid for the
existing customers!
Open Closed

How To "ILogger" in ActionFilter of mvc or web api? #878


0
wddpct created

I found I can't inject “ILogger” as usual, there is no inject point in actionfilter, can you help me to solve it out


1 Answer(s)
  • 0
    hikalkan created
    Support Team

    You can use IocManager.Instance.Resolve... (see document: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Dependency-Injection#DocIocHelper">http://www.aspnetboilerplate.com/Pages/ ... cIocHelper</a>)

    Or you can use dependency injection and create filter like that: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web.Api/WebApi/AbpWebApiModule.cs#L82">https://github.com/aspnetboilerplate/as ... ule.cs#L82</a>