Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 118:
Line 119:            NewsEntity NewsEntity = News.GetByID(Convert.ToInt32(IDRecord), false, PortalSiteName, PortalLanguage);
Line 120:            int IDCategory = NewsEntity.IDCategory;
Line 121:            string Title = NewsEntity.Title;
Line 122:

Source File: e:\ShilatWebSite\_Gadgets\General\SiteCurrentLocation.ascx.cs    Line: 120

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   _ascx_General_CurrentLoc.CheckingNewsPath(String RequestURL, String RequestRaw, ArrayList& Location_URL, ArrayList& Location_Title) in e:\ShilatWebSite\_Gadgets\General\SiteCurrentLocation.ascx.cs:120
   _ascx_General_CurrentLoc.GetPathList() in e:\ShilatWebSite\_Gadgets\General\SiteCurrentLocation.ascx.cs:65
   _ascx_General_CurrentLoc..ctor(Int32 GadgetLoadedID) in e:\ShilatWebSite\_Gadgets\General\SiteCurrentLocation.ascx.cs:40

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +365
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +34
   BusinessLayer.PortalBaseUserControl.LoadControl(String UserControlPath, Object[] constructorParameters) in e:\ShilatWebSite\App_Code\_PortalBaseClasses\PortalBaseUserControls.cs:89
   _ascx_Layouts_Model_2..ctor(Site_LayoutInModulesEntity _Site_LayoutInModulesEntity, Page _WebPage, String ModuleName, String ModulePage) in e:\ShilatWebSite\_ascx\Layouts\3.ascx.cs:137

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +365
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +34
   BusinessLayer.PortalUserPage.LoadControl(String UserControlPath, Object[] constructorParameters) in e:\ShilatWebSite\App_Code\_PortalBaseClasses\PortalUserPage.cs:36
   News_Show.Page_Load(Object sender, EventArgs e) in e:\ShilatWebSite\News\Show.aspx.cs:24
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4676.0