- Machine(Name) : A100007()
- OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2
- No. of Processors: 4
- Uptime: 11 days, 1 hours, 55 minutes
- User Domain Name: HOME
- Interactive User: True
- Username() : mark.smith()
Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
ASP.NET: Environment Details
From Wiki
Summary: An example of how to view details of the web servers environment
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Dim sb As New StringBuilder
- sb.AppendLine("Machine Name: " & Environment.MachineName & "<br>")
- sb.AppendLine("OS Version: " & Environment.OSVersion.VersionString & "<br>")
- sb.AppendLine("No. of Processors: " & Environment.ProcessorCount & "<br>")
- sb.AppendLine("Uptime: " & TimeSpan.FromMilliseconds(Environment.TickCount).Days & " days, ")
- sb.AppendLine(TimeSpan.FromMilliseconds(Environment.TickCount).Hours & " hours, ")
- sb.AppendLine(TimeSpan.FromMilliseconds(Environment.TickCount).Minutes & " minutes<br>")
- sb.AppendLine("User Domain Name: " & Environment.UserDomainName & "<br>")
- sb.AppendLine("Interactive User: " & Environment.UserInteractive & "<br>")
- sb.AppendLine("Username: " & Environment.UserName & "<br>")
- Label1.Text = sb.ToString
- End Sub
Output:
This Hack is part of the ASP.NET Hacks collection



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.