radScheduler error

3 posts, 1 answers
  1. sagar
    sagar avatar
    2 posts
    Member since:
    Jan 2011

    Posted 07 Mar 2011 Link to this post

    I am trying to implement sample for binding xmlprovider to Radscheduler.
    But I am getting the following error .

    Server Error in '/' Application.
    --------------------------------------------------------------------------------
     
    The given key was not present in the dictionary.
    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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
     
    Source Error:
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
     
    Stack Trace:
     
     
    [KeyNotFoundException: The given key was not present in the dictionary.]
       System.Collections.Generic.Dictionary`2.get_Item(TKey key) +9627953
       Telerik.Web.UI.Scheduling.ResourceConverter.Serialize(Object obj, JavaScriptSerializer serializer) +180
       System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +85
       System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +126
       System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1311
       System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
       System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +26
       System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +74
       System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj) +6
       Telerik.Web.UI.RadScheduler.DescribeResources(IScriptDescriptor descriptor, JavaScriptSerializer serializer) +204
       Telerik.Web.UI.RadScheduler.DescribeComponent(IScriptDescriptor descriptor) +972
       Telerik.Web.UI.RadDataBoundControl.Telerik.Web.IControl.DescribeComponent(IScriptDescriptor descriptor) +39
       Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +185
       Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(WebControl control) +31
       Telerik.Web.UI.RadDataBoundControl.GetScriptDescriptors() +31
       Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IScriptControl.GetScriptDescriptors() +33
       System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +128
       System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +49
       Telerik.Web.UI.RadDataBoundControl.RegisterScriptDescriptors() +66
       Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +120
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
       System.Web.UI.Page.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
     
      
     
     
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    My code behind is public partial class WebForm1 : System.Web.UI.Page
        {
            protected void Page_Init(object sender, EventArgs e)
            {
                RadScheduler1.Provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), true);
            }
            protected void Page_Load(object sender, EventArgs e)
            {
            }
        }
    My aspx is

    <telerik:RadScheduler runat="server" ID="RadScheduler1">
       </telerik:RadScheduler>

    My appointments.xml file is in place in App_Data folder
    Pls help
  2. Answer
    Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 07 Mar 2011 Link to this post

    Hello sagar,

    The code for binding the RadScheduler to XMLProvider seems OK. Could you please show me the content of the  Appointments.xml file as well?

    Best wishes,
    Veronica Milcheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. sagar
    sagar avatar
    2 posts
    Member since:
    Jan 2011

    Posted 07 Mar 2011 Link to this post

    Thank you !
    I replaced the xml file with other sample & it works now !
    Perhaps it was corrupted...
Back to Top