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 76:             int idNoticia = Convert.ToInt32(Request.QueryString["idNoticia"]);
Line 77:             var noticia = (from c in data.sailing_content where c.id == idNoticia select c).FirstOrDefault();
Line 78:             var fotos = noticia.images.Replace("{", "").Replace("}", "").Split(',');
Line 79:             var foto = fotos[0];
Line 80:             var fotoSplit = foto.Replace("\"", "").Replace("\\/", "\\").Split(':');

Source File: c:\inetpub\wwwroot\sailing\noticiaDetalhe.aspx.cs    Line: 78

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   noticiaDetalhe.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\sailing\noticiaDetalhe.aspx.cs:78
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
   System.Web.UI.Control.LoadRecursive() +70
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063


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