Kernel Information

Kernel Information

Assembly

  • A component of the .NET framework that contains a compiled code library in a .dll file
  • Used for deployment, versioning, and security

Kernel Information C# Web Control Code

Sitecore.Data.Items.Item item = this.GetItem();
if (item == null) return;

System.Reflection.Assembly assembly = System.Reflection.Assembly.Load("Sitecore.Kernel");
if (assembly == null) return;

System.Diagnostics.FileVersionInfo version = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.Write("C# Web Control Real-time Output");
output.RenderEndTag(); //Div

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-size:x-small; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.P);
//using : for colon and ? for question mark and   for space
output.Write("{0}: {1}", "Item", item.DisplayName);
output.RenderEndTag(); //P

output.Write("{0}&#58;&#160;{1}", "Display Name", "<b>" + assembly.FullName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Code Base", "<b>" + assembly.CodeBase + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Escaped Code Base", "<b>" + assembly.EscapedCodeBase + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Loaded from GAC", "<b>" + assembly.GlobalAssemblyCache.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "CLR Version", "<b>" + assembly.ImageRuntimeVersion + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Path", "<b>" + assembly.Location + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Reflection Only Context", "<b>" + assembly.ReflectionOnly.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Company Name", "<b>" + version.CompanyName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Comments", "<b>" + version.Comments + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Build Part ", "<b>" + version.FileBuildPart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Description", "<b>" + version.FileDescription + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Major Part", "<b>" + version.FileMajorPart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Minor Part", "<b>" + version.FileMinorPart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Name", "<b>" + version.FileName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Private Part", "<b>" + version.FilePrivatePart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "File Version", "<b>" + version.FileVersion.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Internal Name", "<b>" + version.InternalName + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Debug Version", "<b>" + version.IsDebug.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Patched", "<b>" + version.IsPatched.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Pre-Release", "<b>" + version.IsPreRelease.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Private Build", "<b>" + version.IsPrivateBuild.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Special Build", "<b>" + version.IsSpecialBuild.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Language", "<b>" + version.Language + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "LegaL Copyright", "<b>" + version.LegalCopyright + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Legal Trademarks", "<b>" + version.LegalTrademarks + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Original Filename", "<b>" + version.OriginalFilename + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Private Build", "<b>" + version.PrivateBuild + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Product Build Part", "<b>" + version.ProductBuildPart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Product Major Part", "<b>" + version.ProductMajorPart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Product Minor Part", "<b>" + version.ProductMinorPart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Product Name", "<b>" + version.ProductName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Product Private Part", "<b>" + version.ProductPrivatePart.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Product Version", "<b>" + version.ProductVersion + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Special Build", "<b>" + version.SpecialBuild + "</b><br/>");

output.RenderEndTag(); //Div


Kernel Information C# Web Control Output

Display Name: Sitecore.Kernel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null
Code Base: file:///C:/inetpub/wwwroot/TIC66Live/Website/bin/Sitecore.Kernel.DLL
Escaped Code Base: file:///C:/inetpub/wwwroot/TIC66Live/Website/bin/Sitecore.Kernel.DLL
Loaded from GAC? False
CLR Version: v2.0.50727
File Path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\bfbf4984\89153d7a\assembly\dl3\01f106a9\00c4f13f_f9aacd01\Sitecore.Kernel.dll
Reflection Only Context? False
Company Name: Sitecore Corporation
Comments: Sitecore CMS Kernel Library.
File Build Part : 0
File Description: Sitecore.Kernel
File Major Part: 6
File Minor Part: 6
File Name: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\bfbf4984\89153d7a\assembly\dl3\01f106a9\00c4f13f_f9aacd01\Sitecore.Kernel.dll
File Private Part: 4214
File Version: 6.6.0.4214
Internal Name: Sitecore.Kernel.dll
Is Debug Version? False
Is Patched? False
Is Pre-Release? False
Is Private Build? False
Is Special Build? False
Language: Language Neutral
LegaL Copyright: Copyright © Sitecore Corporation 1999-2010
Legal Trademarks: Sitecore® is a registered trademark of Sitecore Corporation.
Original Filename: Sitecore.Kernel.dll
Private Build: 
Product Build Part: 0
Product Major Part: 6
Product Minor Part: 6
Product Name: Sitecore CMS
Product Private Part: 0
Product Version: 6.6.0 rev. 121015
Special Build:

Sources