How to find the Client IP address from within my WCF service, I have already used below code but gaves me LocalEndPoint IP i require RemoteEndpoint IP
Dim context As OperationContext = OperationContext.Current
Dim messageProperties As MessageProperties = context.IncomingMessageProperties
Dim endpointProperty As RemoteEndpointMessageProperty = TryCast(messageProperties(RemoteEndpointMessageProperty.Name), RemoteEndpointMessageProperty)
objLagBll.sb_TrackClientIP(endpointProperty.Address, endpointProperty.Port, FnName)
shabbir_215
Member
427 Points
419 Posts
How to find the Client IP address from within my WCF service
Nov 30, 2012 11:16 AM|LINK
Hi Guys
How to find the Client IP address from within my WCF service, I have already used below code but gaves me LocalEndPoint IP i require RemoteEndpoint IP
Dim context As OperationContext = OperationContext.Current Dim messageProperties As MessageProperties = context.IncomingMessageProperties Dim endpointProperty As RemoteEndpointMessageProperty = TryCast(messageProperties(RemoteEndpointMessageProperty.Name), RemoteEndpointMessageProperty) objLagBll.sb_TrackClientIP(endpointProperty.Address, endpointProperty.Port, FnName)Thanks in Advance
Shabbir
Raigad
Contributor
5129 Points
956 Posts
Re: How to find the Client IP address from within my WCF service
Nov 30, 2012 12:02 PM|LINK
Hi,
Refer this
http://babasahebkale.blogspot.in/2011/08/geting-client-ip-address.html
Mark as Answer, if the post helped you...
Visit My Blog
shabbir_215
Member
427 Points
419 Posts
Re: How to find the Client IP address from within my WCF service
Nov 30, 2012 01:47 PM|LINK
Thanks Raigad will your code work within WCF to get client IP address. I have one more query what is advantage of getting Port number in previous code