I have some code that generates an email and I want to include the actual server machine name that is running in the body of the email. (It’s a clustered web environment, so I want to find out what actual machine is sending the email.)
I know I can use Request.Url.AbsoluteUri, but that gives me the URL (like http://www.mysite.com/MyController/Action) instead of the raw actual machine name – which might be MACH3234k323).
Is there a way that I can get the actual server machine’s name?
Use
System.Environment.MachineName