Asp.net code for get the computer's name,OSVersion,Memory Working set

How to get the information about local computer by web page:

information about local computer by web page:

In this Post we give some code by this Asp.net code you can get all the information about the local computer in which the web site or web page is run.

we can fetch  local computer information by c# code in web page.

C# code for give the possible information:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Information_about_computer : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {

        // get the local compurt name
        Response.Write("<h1>The MachineName is </h1>" + System.Environment.MachineName.ToString()+"</br>");

        //get the  OS Version can be identified by the following code- 
        Response.Write("<h1>The OS Version is </h1>" + System.Environment.OSVersion.ToString() + "</br>");

        //get the Memory Working set can be identified by the following code- 
        Response.Write("<h1>The Memory Working set is </h1>" + System.Environment.WorkingSet.ToString() + "<br/>");

        //get visitor ip address.
        string ipaddress;
        ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (ipaddress == "" || ipaddress == null)
            ipaddress = Request.ServerVariables["REMOTE_ADDR"];

        Response.Write("<h1>The visitor ip address is </h1>" + ipaddress + "<br/>");

    }

}



Asp.net code for get the computer's name,OSVersion,Memory Working set


Other Asp.net related post:


Comments

Popular posts from this blog