String product = ConfigurationManager.AppSettings["reportProduct"];
String buildVersion = ConfigurationManager.AppSettings["appBuild"];
string productVersionNumberFromDll = "";
string fileVersionNumberFromDll = "";
try
{
string dllFile = Server.MapPath("bin/applicationWeb.dll");
FileVersionInfo dllFileVersionInfo = FileVersionInfo.GetVersionInfo(dllFile);
fileVersionNumberFromDll = dllFileVersionInfo.FileVersion;
productVersionNumberFromDll = dllFileVersionInfo.ProductVersion;
}
catch (Exception)
{
//throw;
}
try
{
string NETAssemblyVersion = Environment.Version.ToString();
string OS = Environment.OSVersion.ToString();
string MachineName = Environment.MachineName.ToString();
string UserDomainName = Environment.UserDomainName.ToString();
string UserName = Environment.UserName.ToString();
Response.Write("Product: " + product);
Response.Write("<BR>application Version: " + buildVersion);
Response.Write("<BR>dll File Version: " + fileVersionNumberFromDll);
Response.Write("<BR>dll Product Version: " + productVersionNumberFromDll);
Response.Write("<BR>");
Response.Write(".NET Version: " + NETAssemblyVersion + "<BR>");
Response.Write("OS: " + OS + "<BR>");
Response.Write("MachineName: " + MachineName + "<BR>");
Response.Write("UserDomainName: " + UserDomainName + "<BR>");
Response.Write("UserName: " + UserName + "<BR>");
string myConn = DBConnection.getDBConnection();
Response.Write("<P>" + myConn);
Response.Write("URL Components<BR><HR><BR>");
Response.Write(" Request.Url.Scheme : " + Request.Url.Scheme + "<BR>");
Response.Write(" Request.Url.Host : " + Request.Url.Host + "<BR>");
Response.Write(" Request.Url.IsDefaultPort : " + Request.Url.IsDefaultPort.ToString() + "<BR>");
Response.Write(" Request.Url.Port : " + Request.Url.Port + "<BR>");
// string URLprefix = Request.Url.Scheme + System.Uri.SchemeDelimiter + Request.Url.Host + (Request.Url.IsDefaultPort ? "" : ":" + Request.Url.Port);
}
catch (Exception ex)
{
Response.Write(ex.Message);
//throw;
}
No comments:
Post a Comment