The handle is invalid

6 posts, 0 answers
  1. John Snyder
    John Snyder avatar
    43 posts
    Member since:
    Mar 2006

    Posted 11 May 2011 Link to this post

    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)

  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 13 May 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. John Snyder
    John Snyder avatar
    43 posts
    Member since:
    Mar 2006

    Posted 20 May 2011 Link to this post

    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



  5. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 26 May 2011 Link to this post

    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.

  6. JJ
    JJ avatar
    21 posts
    Member since:
    Jul 2014

    Posted 25 Jul 2014 in reply to Veronica Link to this post

    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..












  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 30 Jul 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017