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

radScheduler error

2 Answers 73 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
sagar
Top achievements
Rank 1
sagar asked on 07 Mar 2011, 07:19 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Veronica
Telerik team
answered on 07 Mar 2011, 08:17 AM
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!
0
sagar
Top achievements
Rank 1
answered on 07 Mar 2011, 09:13 AM
Thank you !
I replaced the xml file with other sample & it works now !
Perhaps it was corrupted...
Tags
Scheduler
Asked by
sagar
Top achievements
Rank 1
Answers by
Veronica
Telerik team
sagar
Top achievements
Rank 1
Share this question
or