看来每天都会记录一次这个错误。
事件代码:3005
事件消息:发生未处理的异常。
活动时间:11-2-2019 09:38:55
事件顺序:2024
事件发生次数:1
事件详细信息代码:0
申请信息:
应用程序域/LM/W3SVC/2/ROOT-1-131943410407985469
应用程序虚拟路径:/
应用程序路径:C:\inetpub\wwwroot\
机器名称:PRO01
工艺编号:540
异常信息:
异常类型:NullReferenceException
异常消息:对象引用未设置为对象的实例。
在达瓦蒂.WMS.RF.公共.SiteMaster.OnInit(事件参数e)
在系统.Web.UI.控件.InitRecursive(控制命名容器)
请求信息:
请求URL:
https://...:8080/Pages/Authentication/Login.aspx
用户主机地址:
已验证:False
身份验证类型:
线程帐户名:IIS应用程序池。。。
线程信息:
线程帐户名称:IIS APPPOOL\
正在冒充:False
堆栈跟踪:在。。。WMS.RF.通用.网站管理员.OnInit(事件参数e)
在系统.Web.UI.控件.InitRecursive(控制命名容器)
在系统.Web.UI.Page.ProcessRequestMain页(布尔值includeStagesBeforeAsyncPoint,布尔值includestagesafterasincpoint)
所以调查一下网站管理员.cs我看到了。事实上,我认为这没有任何问题。你能帮我找到它吗?
public partial class SiteMaster : System.Web.UI.MasterPage
{
private readonly string WT4100 = "WT4100";
private readonly string MC9200 = "MC9200";
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (!Page.Request.Path.EndsWith("/Login.aspx") && Session.IsNewSession)
{
Response.Redirect("~/Pages/Authentication/Login.aspx");
}
Page.ClientScript.RegisterStartupScript(this.GetType(), "InitializeEventHandlers", "focusController.initializeFocusController(false);", true);
Page.ClientScript.RegisterStartupScript(this.GetType(), "InitializeCustomScrollbar", "toggleScrollBarVisibility();", true);
Page.ClientScript.RegisterStartupScript(this.GetType(), "InitializeWindowResize", "handleResizeEvent();", true);
// a special stylesheet needs to be used for landscape device
if (Request != null && !string.IsNullOrEmpty(Request.UserAgent))
{
if (Request.UserAgent.Contains(WT4100))
{
IsWT41NO.Value = true.ToString();
}
else if (Request.UserAgent.Contains(MC9200))
{
IsMC92NO.Value = true.ToString();
}
}
LiteralControl mainCssStyleSheet = new LiteralControl();
if (Request.ServerVariables["HTTP_USER_AGENT"].ToLower().Contains("android"))
{
mainCssStyleSheet.Text = "<link href=\"../../Styles/Common/Android/Site.css\" rel=\"stylesheet\" type=\"text/css\">";
}
else
{
mainCssStyleSheet.Text = "<link href=\"../../Styles/Common/Site.css\" rel=\"stylesheet\" type=\"text/css\">";
}
MainCssPlaceHolder.Controls.Add(mainCssStyleSheet);
LiteralControl specialDeviceCssStyleSheet = new LiteralControl();
if (IsWT41NODevice)
{
specialDeviceCssStyleSheet.Text = "<link href=\"../../Styles/Common/WT41NO/Site.css\" rel=\"stylesheet\" type=\"text/css\">";
}
else if (IsMC92NODevice)
{
specialDeviceCssStyleSheet.Text = "<link href=\"../../Styles/Common/Site_MC92NO.css\" rel=\"stylesheet\" type=\"text/css\">";
}
MainCssPlaceHolder.Controls.Add(specialDeviceCssStyleSheet);
using (Session session = new Session())
{
string javaScriptCoraxRFSystemSetting = WMSSystemSetting.Get_JavaScriptCoraxRF(session);
if (!string.IsNullOrWhiteSpace(javaScriptCoraxRFSystemSetting))
{
LiteralControl javaScriptCoraxRF = new LiteralControl();
javaScriptCoraxRF.Text = string.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", javaScriptCoraxRFSystemSetting);
BottomPageContent.Controls.Add(javaScriptCoraxRF);
}
RfLayoutOption rfLayoutOption = RfLayoutOption.Default;
if (!PageHelper.IsSessionVariableSet(SessionConstants.SiteStyle))
{
rfLayoutOption = WMSSystemSetting.Get_RfLayout(session);
Session[SessionConstants.SiteStyle] = rfLayoutOption;
}
else
{
rfLayoutOption = (RfLayoutOption)Enum.Parse(typeof(RfLayoutOption), Session[SessionConstants.SiteStyle].ToString());
}
AddStyleAccordingToRfLayout(rfLayoutOption);
}
if (!this.DesignMode && !IsPostBack)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "FocusFirstInput", "focusController.focusFirstControl();", true);
// disable client-side caching, so that the user is redirected to the loginpage
// when clicking browser back button after logout
Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
Response.Cache.SetValidUntilExpires(false);
Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
if (!Page.Request.Path.EndsWith("/Login.aspx") && !SecuritySystem.Instance.IsAuthenticated)
{
Response.Redirect("~/Pages/Authentication/Login.aspx");
}
if (Page.Request.Path.EndsWith("/Login.aspx"))
{
AIC.Text = "version " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
} ...