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

[Solved] PageRequestManagerServerErrorException

1 Answer 206 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 03 Dec 2009, 05:01 AM
Hello,

I am having problems with the RadScheduler!  I can drag appointments around and they are saved properly to the database, I am using code behind to a sql table adapter for the update.  I can drag items from a grid onto the scheduler with no problems.  However when I try to edit an appointment I get the following error:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occured while processing the request on the server. The status code returned from the server was: 500

Once the edit window comes up I can not update or cancel without getting this error.  I thought it was my database parameters so I tried to trap the call to the sql adapter using my own adapter, but it never even hits the adapter.  I tried profiling sql but it never calls into the database.  I tried the AppointmentCommand, AppointmentUpdate, and AppointmentCanceling triggers, but they don't seem to fire.

Can anyone give me an idea as to where to start looking for the problem?

Here is the code for my scheduler

<telerik:RadScheduler ID="SchedMaint" runat="server" DataEndField="End"   
                    DataKeyField="ID" DataSourceID="objSched" DataStartField="Start"   
                    DataSubjectField="Subject" SelectedView="WeekView"   
                    onappointmentcreated="SchedMaint_AppointmentCreated"   
                    CustomAttributeNames="CompletedDate,MaintSchedType"   
                    onappointmentcommand="SchedMaint_AppointmentCommand"   
                    onappointmentupdate="SchedMaint_AppointmentUpdate" onappointmentcancelingedit="SchedMaint_AppointmentCancelingEdit"   
                   > 
                      
                    <TimeSlotContextMenuSettings EnableDefault="false" /> 
                    <TimeSlotContextMenus> 
                    </TimeSlotContextMenus> 
                      
                    <AppointmentContextMenuSettings EnableDefault="false" /> 
                    <AppointmentContextMenus> 
                        <telerik:RadSchedulerContextMenu runat="server" ID="maintSchedApptContextMenu">  
                            <Items> 
                                <telerik:RadMenuItem Text="Edit" Value="CommandEdit" /> 
                                <telerik:RadMenuItem Text="Print" Value="Print" onclick="alert('bob')" /> 
                            </Items> 
                        </telerik:RadSchedulerContextMenu> 
                    </AppointmentContextMenus> 
                      
 
                     
                    <AdvancedForm Enabled="True" /> 
                      
 
                     
                </telerik:RadScheduler> 


Thanks,

Tom

1 Answer, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 03 Dec 2009, 02:40 PM
So I really hate it when I cause extra work for myself, but that is exactly what I did here.

To find my problem I removed the RadAjaxManager forcing the page to do a full postback when I updated or cancelled an appointment edit.  This let asp give me a much better error, here is the actual error:

A potentially dangerous Request.Form value was detected from the client (ctl00_yyy_yyy_Form_Subject_text="...</br> ......"

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

 

 
It turns out that when I was playing around with having sql do some of the formatting for me I forgot to take out one of the breaks in the subject line.  Asp was interpreting it as a scripting attack.

Removing the </br> from my sql query fixed the problem.

Tags
Scheduler
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Share this question
or