This is a migrated thread and some comments may be shown as answers.

The handle is invalid

5 Answers 80 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
John Snyder
Top achievements
Rank 1
John Snyder asked on 11 May 2011, 03:03 PM
We get this error on occasion in our application and was wondering what may be causing it.  Any help/guidance would be appreciated.

System.IO.IOException: The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.Threading.EventWaitHandle.Set()
at Telerik.Web.UI.RadScheduler.resourceTypeControl_DataBound(Object sender, EventArgs e)
at System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Telerik.Web.UI.RadScheduler.BindResourcesFromDataSource()
at Telerik.Web.UI.RadScheduler.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Telerik.Web.UI.RadScheduler.EnsureDataBound()
at Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource)
at Telerik.Web.UI.RadScheduler.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

5 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 13 May 2011, 04:26 PM
Hi Dustin DeFoe,

Unfortunately the provided information is not enough for us to tell you what may cause this error. I suspect that there is a problem in the binding of resources but I will need some more assistance from your side. Could you please show me the code of the RadScheduler and how do you bind it?

Thank you!

Kind regards,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
John Snyder
Top achievements
Rank 1
answered on 20 May 2011, 02:02 PM
HTML Code:
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadScheduler1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
 
    <telerik:RadScheduler runat="server" ID="RadScheduler1"
        Height="95%" Width="100%"
        ShowFooter="false"
        AllowEdit="false" AllowInsert="false" AllowDelete="false"
        ReadOnly="true" Enabled="true"
        DayStartTime="08:00:00" DayEndTime="17:00:00"                       
        FirstDayOfWeek="Monday" LastDayOfWeek="Friday"
        EnableDescriptionField="false"
        DataKeyField="ID"
        DataSubjectField="Subject"
        DataStartField="Start"
        DataEndField="End"
        DataRecurrenceField="RecurrenceRule"
        DataRecurrenceParentKeyField="RecurrenceParentID"
        NumberOfHoveredRows="1"
        MonthView-VisibleAppointmentsPerDay="8"
        TimelineView-UserSelectable="False"
        DayView-UserSelectable="True"
        MonthView-UserSelectable="True"
        WeekView-UserSelectable="True"
        AppointmentContextMenuSettings-EnableDefault="false"
        TimeSlotContextMenuSettings-EnableDefault="false">
        <ResourceStyles>
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Hearing Slot" ApplyCssClass="rsCategoryGreen" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Credit" ApplyCssClass="rsCategoryGreen" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Emergent Hearing Slot" ApplyCssClass="rsCategoryRed" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Vacation" ApplyCssClass="rsCategoryBlue" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Training" ApplyCssClass="rsCategoryPink" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Holiday - Office Open" ApplyCssClass="rsCategoryOrange" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Holiday - Office Closed" ApplyCssClass="rsCategoryOrange" />
            <Telerik:ResourceStyleMapping Type="TimeCode" Text="" ApplyCssClass="rsCategoryOrange" />
            <telerik:ResourceStyleMapping Type="TimeCode" Text="Settlement" ApplyCssClass="rsCategoryYellow" />
        </ResourceStyles>
        <AppointmentTemplate>      
            <div>
                <asp:hyperlink ID="hlSubject" runat="server" Text='<%# Eval("Subject") %>' />
            </div>
        </AppointmentTemplate>
    </telerik:RadScheduler>


Binding (We are binding to a list of our Custom Object - CalendarEvent)
RadScheduler1.DataSource = GetAppointmentsForView()

AppointmentDataBound
Protected Sub RadScheduler1_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles RadScheduler1.AppointmentDataBound
    Dim evnt As CalendarEvent = CType(e.Appointment.DataItem, CalendarEvent)
    Dim Subject As String = String.Empty
    Dim Tooltip As String = String.Empty
    Dim HREF As String = String.Empty
    Dim ShortSubject As String = String.Empty
    GetSubject(evnt, Subject, Tooltip, ShortSubject)
 
    e.Appointment.Subject = Subject
    e.Appointment.ToolTip = Tooltip
End Sub

PreRender
Protected Sub RadScheduler1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadScheduler1.PreRender
    Dim PopupCal As RadCalendar = RadScheduler1.FindControl("SelectedDateCalendar")
    PopupCal.FastNavigationStep = 12
End Sub



0
Veronica
Telerik team
answered on 26 May 2011, 12:03 PM
Hi Dustin DeFoe,

I tried to reproduce the issue but to no avail. There is no error on my side. The only thing that is different on my side is the way I bind the RadScheduler - in my case it is with XmlProvider. Could you please take a look at the attached .zip  file and test whether the issue appears on your side?

All the best,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
JJ
Top achievements
Rank 2
answered on 25 Jul 2014, 09:46 AM
Hi

I think this was used:
 private static EventWaitHandle asyncWait = new ManualResetEvent(false);

then

asyncWait.Set(); //inside a wrong event

because that is what I am trying to do in my preRenderEvent to wait until the event is finished... then do a task..












0
Boyan Dimitrov
Telerik team
answered on 30 Jul 2014, 08:35 AM
Hello JJ,

Could you please elaborate a bit more on your scenario and explain what  issue you are facing?

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
John Snyder
Top achievements
Rank 1
Answers by
Veronica
Telerik team
John Snyder
Top achievements
Rank 1
JJ
Top achievements
Rank 2
Boyan Dimitrov
Telerik team
Share this question
or