How could I get the server name in Server method and Client method

Hi All,

I want to get the server name in my method to distinguish between production server and testing server .

So how do I get it?

Thanks.