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 1262:            foreach (SeoInfo sinf in _CatSeoInfoListItems.Values)
Line 1263:            {
Line 1264:                if (sinf.MetaURL != null)
Line 1265:                {
Line 1266:                    if (sinf.Itemid == itemid.ToString() && sinf.Language.ToLower() == Language.ToLower())

Source File: c:\inetpub\wwwroot\GhidiniV2\App_Code\_Environment.cs    Line: 1264

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   GlobalEnvironment.GetSeoItem(Int32 itemid, String Language) in c:\inetpub\wwwroot\GhidiniV2\App_Code\_Environment.cs:1264
   ProjectDS.AddMetaTags() in c:\inetpub\wwwroot\GhidiniV2\ProjectDS.aspx.cs:107
   ProjectDS.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\GhidiniV2\ProjectDS.aspx.cs:80
   System.Web.UI.Control.OnLoad(EventArgs e) +107
   System.Web.UI.Control.LoadRecursive() +89
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1532


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