Server Error in '/' Application.

Data is Null. This method or property cannot be called on Null values.

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.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

Source Error:


Line 164: { Line 165: dbImage = getImageData(Convert.ToInt32(dbArticle.FrontImage.Value)); Line 166: imgPath = dbImage.ImagePath.Value.Substring(2).Replace("ImageSize", "178"); Line 167: } Line 168:

Source File: c:\inetpub\vhosts\hiddush.org\httpdocs\News.aspx.cs    Line: 166

Stack Trace:


[SqlNullValueException: Data is Null. This method or property cannot be called on Null values.] System.Data.SqlTypes.SqlString.get_Value() +2347721 _News.fillChannel(Int32 channelId) in c:\inetpub\vhosts\hiddush.org\httpdocs\News.aspx.cs:166 _News.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\hiddush.org\httpdocs\News.aspx.cs:49 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +95 System.Web.UI.Control.LoadRecursive() +59 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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