Server Error in '/summit/sisca' 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 29:         if (datarReader.Read())
Line 30:         {
Line 31:             Response.AddHeader("Content-Disposition", "attachment; filename=" + datarReader.GetString(2));
Line 32:             long bytesize = datarReader.GetBytes(0, 0, null, 0, 0);
Line 33:             Response.AddHeader("Content-Length", bytesize.ToString());

Source File: d:\WebSites\vdSISCA\Download.aspx.cs    Line: 31

Stack Trace:


[SqlNullValueException: Data is Null. This method or property cannot be called on Null values.]
   System.Data.SqlClient.SqlBuffer.get_String() +2799150
   Download.Page_Load(Object sender, EventArgs e) in d:\WebSites\vdSISCA\Download.aspx.cs:31
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +11906638
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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