Network ASP.Net

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="ShowRuntimeInfo" %>



    Runtime Inspector


    
    

        
         
        

             
    

    


File: Default.aspx.cs
using System;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Reflection;
using System.Text;
using System.IO;
public partial class ShowRuntimeInfo : System.Web.UI.Page
{
    protected void OnShowInfo(object sender, EventArgs e)
    {
        DisplayRuntimeInfo();
    }
    private void DisplayRuntimeInfo()
    {
        StringBuilder sb = new StringBuilder("");
        sb.Append("AppDomainAppId:");
        sb.Append(HttpRuntime.AppDomainAppId);
        sb.Append("
");
        sb.Append("AppDomainAppPath:");
        sb.Append(HttpRuntime.AppDomainAppPath);
        sb.Append("
");
        sb.Append("AppDomainAppVirtualPath:");
        sb.Append(HttpRuntime.AppDomainAppVirtualPath);
        sb.Append("
");
        sb.Append("AppDomainId:");
        sb.Append(HttpRuntime.AppDomainId);
        sb.Append("
");
        sb.Append("Temp ASP.NET Directory");
        sb.Append(HttpRuntime.CodegenDir);
        sb.Append("
");
        Assembly[] listOfAssem = AppDomain.CurrentDomain.GetAssemblies();
        sb.Append("Assemblies in the AppDomain (");
        sb.Append(listOfAssem.Length.ToString());
        sb.Append(")
");
        ArrayList list = new ArrayList();
        foreach (Assembly a in listOfAssem)
        {
            try
            {
                list.Add(Path.GetFileName(a.Location));
            }
            catch
            {
            }
        }
        list.Sort();
        sb.Append("
    ");
            foreach (object asm in list)
            {
                sb.Append("
  • ");
                sb.Append((string)asm);
                sb.Append("
  • ");
            }
            sb.Append("
");
        sb.Append("");
        TheRuntimeInfo.Text = sb.ToString();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        HttpRuntime.UnloadAppDomain();
        DisplayRuntimeInfo();
    }
}