Question

Get IP address of the server in server code

Dear team,

For logging purposes, we would like to get the IP address of the server through server code.

Are there ways of getting it through app connection?

Thanks

Like 0

Like

3 comments
Best reply

The server may have several addresses from my practice, it is better to use the host name.

See this post How Can i Get the Current Local Host Name using C#

The server may have several addresses from my practice, it is better to use the host name.

See this post How Can i Get the Current Local Host Name using C#

Hello Shivani,

 

Please, check out the recommendation provided in the previous post. 

 

Let us know in case any further information is required. 

 

Best regards, 

Olga. 

Thanks Grigoiry and Olga! The suggested solution works.

Show all comments