c# - Logging IP Address in WCF Service -
i'm using nlog in wcf service , log caller ip-address.
i've tried using aspnet-layoutrenderers (${aspnet-request:servervariable=remote_host}, ${aspnet-request:servervariable=remote_addr}, no avail, internal nlog exception being thrown , no log file being generated.
is there way log ip address in wcf service, without needing pass parameter called method?
var msg = operationcontext.current .incomingmessageproperties[remoteendpointmessageproperty.name] remoteendpointmessageproperty; var address = msg.address;
Comments
Post a Comment