62,074
社区成员
发帖
与我相关
我的任务
分享
日志名称: Application
来源: ASP.NET 2.0.50727.0
日期: 2012/1/11 13:51:17
事件 ID: 1334
任务类别: 无
级别: 错误
关键字: 经典
用户: 暂缺
计算机: yoksrv1
描述:
发生未处理的异常,并已终止进程。
Application ID: /LM/W3SVC/3/ROOT
Process ID: 10304
Exception: System.NullReferenceException
Message: 未将对象引用设置到对象的实例。
StackTrace: 在 AspNetForums.ForumsHttpModule.ScheduledWorkCallbackEmailInterval(Object sender)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading._TimerCallback.PerformTimerCallback(Object state)
事件 Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="49152">1334</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-01-11T05:51:17.000000000Z" />
<EventRecordID>5167</EventRecordID>
<Channel>Application</Channel>
<Computer>yoksrv1</Computer>
<Security />
</System>
<EventData>
<Data>发生未处理的异常,并已终止进程。
Application ID: /LM/W3SVC/3/ROOT
Process ID: 10304
Exception: System.NullReferenceException
Message: 未将对象引用设置到对象的实例。
StackTrace: 在 AspNetForums.ForumsHttpModule.ScheduledWorkCallbackEmailInterval(Object sender)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading._TimerCallback.PerformTimerCallback(Object state)</Data>
</EventData>
</Event>
#region 回调方法
// Timer Callbacks
// 邮件发送/匿名在线更新ScheduledWorkCallbackEmailInterval(Object sender)
private void ScheduledWorkCallbackEmailInterval(object sender)
{
if ((HttpContext)sender != null)
{
try
{
// suspend the timer while we process emails
emailTimer.Change(System.Threading.Timeout.Infinite, EmailInterval);
// Send emails
//
Emails.SendQueuedEmails((HttpContext)sender);
// Update anonymous users
//
Users.UpdateAnonymousUsers((HttpContext)sender);
// Init User Day Intrgral
Users.InitUserDayIntrgral((HttpContext)sender);
}
catch (Exception e)
{
ForumException fe = new ForumException(ForumExceptionType.EmailUnableToSend, "Scheduled Worker Thread failed.", e);
fe.Log();
}
finally
{
emailTimer.Change(EmailInterval, EmailInterval);
}
}
}
#region 应用程序初始化
/// <summary>
/// 应用程序初始化
/// </summary>
/// <param name="application"></param>
public void Init(HttpApplication application)
{
// Wire-up application events
//
application.BeginRequest += new EventHandler(this.Application_BeginRequest);
application.AuthenticateRequest += new EventHandler(Application_AuthenticateRequest);
application.Error += new EventHandler(this.Application_OnError);
application.AuthorizeRequest += new EventHandler(this.Application_AuthorizeRequest);
#if DEBUG
application.ReleaseRequestState += new EventHandler(this.Application_ReleaseRequestState);
#endif
ForumConfiguration forumConfig = ForumConfiguration.GetConfig();
if( forumConfig != null
&& forumConfig.IsBackgroundThreadingDisabled == false )
{
if (emailTimer == null)
[b]emailTimer = new Timer(new TimerCallback(ScheduledWorkCallbackEmailInterval), application.Context, EmailInterval, EmailInterval);[/b] if( forumConfig.IsIndexingDisabled == false && statsTimer == null )
{
statsTimer = new Timer(new TimerCallback(ScheduledWorkCallbackStatsInterval), application.Context, StatsInterval, StatsInterval);
}
if (activateEmailTimer == null)
activateEmailTimer = new Timer(new TimerCallback(ScheduledWorkCallbackActivateEmailInterval), application.Context, ActivateEmailInterval, ActivateEmailInterval);
}
//
Users.UpdateAnonymousUsers((HttpContext)sender);
// Init User Day Intrgral
Users.InitUserDayIntrgral((HttpContext)sender);