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 www.mysite.com/MyController/Action) instead of the raw actual machine name - which might be MACH3234k323).
Request.Url.AbsoluteUri
Is there a way that I can get the actual server machine's name?
Use System.Environment.MachineName
System.Environment.MachineName
1.4m articles
1.4m replys
5 comments
57.0k users