Base solution for your next web application
Open Closed

Audit Info log entry spamming log file #2563


User avatar
0
sparkyjr created

Our solution is built using ASPNetZero and our web app is hosted on Azure. The log files in Azure are getting inundated with the following entry (approx. every 2 mins)

WARN XXX... Abp.Auditing.WebAuditInfoProvider - Could not obtain web parameters for audit info. WARN XXX... Abp.Auditing.WebAuditInfoProvider - System.Net.Sockets.SocketException (0x80004005): No such host is known at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Abp.Auditing.WebAuditInfoProvider.GetClientIpAddress(HttpContext httpContext) at Abp.Auditing.WebAuditInfoProvider.Fill(AuditInfo auditInfo)

Tried following the solution described at <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/467">https://github.com/aspnetboilerplate/as ... issues/467</a> but could not find the relevant libraries in the ASPNet Zero solution. We are currently on version 1.9.0 (Package version 0.8.3.0). Is there a way we can selectively disable this log entry? Any other alternate solutions possible?

Thanks. SJ


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    In order to use that solution you need to upgrade your project to ABP 0.9.0.

    Or you can try to create a new class which implements IAuditInfoProvider and register that class to dependency injection. You need to call IsDefault to replace default implementation with yours.

    For example:

    Component.For<IAuditInfoProvider>().ImplementedBy<YourAuditInfoProvider>().IsDefault();