C# .NET - Get Machine name - Asked By manutosh pandey on 06-Jan-06 05:50 AM

Hi all,
        I have a problem that I want to fetch machine name on which my site is running. But it always give me the server machine name because it is executing at server end. So please help me regarding this issue. How can I get the machine name on which my site is running.
                         Million of thanks in advance.
Manutosh

You get the machine name - Asked By Jon Wojtowicz on 06-Jan-06 06:03 AM

by using System.Environment.MachineName. This will give you the name of the server your website is running on.