Server Error in '/' Application.

Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:


Line 25:                 sdr.Read();
Line 26:                 
Line 27:                 bytes = (byte[])sdr["AudioFile"];
Line 28:                 PodCastsFileType = sdr["podCastsFileType"].ToString();
Line 29:                 PodCastsName = sdr["podCastsName"].ToString();

Source File: e:\kunden\homepages\16\d889998925\www\amulragalfm\FileCS.ashx    Line: 27

Stack Trace:


[InvalidOperationException: Invalid attempt to read when no data is present.]
   System.Data.SqlClient.SqlDataReader.CheckDataIsReady(Int32 columnIndex, Boolean allowPartiallyReadColumn, Boolean permitAsync, String methodName) +1769206
   System.Data.SqlClient.SqlDataReader.TryReadColumn(Int32 i, Boolean setTimeout, Boolean allowPartiallyReadColumn) +49
   System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) +32
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +76
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +28
   FileCS.ProcessRequest(HttpContext context) in e:\kunden\homepages\16\d889998925\www\amulragalfm\FileCS.ashx:27
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +195
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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