Retrying loading build number -- this time in master page background
This commit is contained in:
@@ -72,20 +72,6 @@
|
||||
|
||||
// This part really should have been in Application_Start, but it doesn't fire for some reason
|
||||
|
||||
// Read build number, or set to "Private" if none
|
||||
|
||||
try
|
||||
{
|
||||
using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/BuildIdentity.txt")))
|
||||
{
|
||||
HttpContext.Current.Application["BuildIdentity"] = "Build " + reader.ReadLine();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
HttpContext.Current.Application["BuildIdentity"] = "Private Build";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Session_End (object sender, EventArgs e)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -21,6 +22,23 @@ namespace Activizr
|
||||
|
||||
this.LanguageSelector.LanguageChanged += new EventHandler(LanguageSelector_LanguageChanged);
|
||||
|
||||
// Read build number if not loaded, or set to "Private" if none
|
||||
|
||||
if (HttpContext.Current.Application["BuildIdentity"] == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/BuildIdentity.txt")))
|
||||
{
|
||||
HttpContext.Current.Application["BuildIdentity"] = "Build " + reader.ReadLine();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
HttpContext.Current.Application["BuildIdentity"] = "Private Build";
|
||||
}
|
||||
}
|
||||
|
||||
// Titles etc
|
||||
|
||||
this.IconPage.ImageUrl = "/Images/PageIcons/" + this.CurrentPageIcon + "-40px.png";
|
||||
|
||||
Reference in New Issue
Block a user