“/”应用程序中的服务器错误。

No row with the given identifier exists[Model.T_News#569]

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: NHibernate.ObjectNotFoundException: No row with the given identifier exists[Model.T_News#569]

源错误:


行 15:             if (ID != StringUtil.DefaultValue)
行 16:             {
行 17:                 Model.T_News model = BLL.BllBase<Model.T_News>.GetId(ID);
行 18: 
行 19:                 ltTitle.Text = model.TitleEn;

源文件: d:\vhostroot\localuser\m.dyer23\www\en\NewsDetail.aspx.cs    行: 17

堆栈跟踪:


[ObjectNotFoundException: No row with the given identifier exists[Model.T_News#569]]
   NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +37
   NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +205
   NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +131
   NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +418
   NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +200
   NHibernate.Impl.SessionImpl.Load(String entityName, Object id) +250
   NHibernate.Impl.SessionImpl.Load(Type entityClass, Object id) +177
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) +107

[NotFoundException: Could not find T_News with id 569]
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) +260
   Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) +61
   DAL.DalHelper`1.ext_GetId(Int32 id) in F:\程序\内蒙古\代码\DAL\DalHelper.cs:46
   BLL.BllBase`1.GetId(Int32 id) in F:\程序\内蒙古\代码\BLL\BllBase.cs:30
   cn_Default.Page_Load(Object sender, EventArgs e) in d:\vhostroot\localuser\m.dyer23\www\en\NewsDetail.aspx.cs:17
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本信息: Microsoft .NET Framework 版本:2.0.50727.8974; ASP.NET 版本:2.0.50727.8974