In this article I am going to explain how we can get
operating system information in asp.net application:
Below code can show all information:
using System;
using
System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace
Get_OS_information_in_ASP.NET
{
public partial class DisplayOSInformation : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
GetOSInformation();
}
public void GetOSInformation()
{
OperatingSystem os = System.Environment.OSVersion;
Response.Write("<b>Platform
:</b> "
+ os.Platform + "<br/><br/>");
Response.Write("<b>Service
Pack :</b> "
+ os.ServicePack + "<br/><br/>");
Response.Write("<b>Version
:</b> "
+ os.Version + "<br/><br/>");
Response.Write("<b>VersionString
:</b> "
+ os.VersionString + "<br/><br/>");
Response.Write("<b>CLR
Version :</b> "
+ System.Environment.Version);
}
}
}
Run the
application:

Image 1.