Ticket #2399 (new Bug)

Opened 5 weeks ago

Last modified 4 weeks ago

FCKEditor AJAX problem - WebForms.PageRequestManagerServerErrorException: Status code 500

Reported by: Pedantix Owned by:
Priority: Normal Milestone:
Component: Server : ASP.Net Version:
Keywords: Pending WorksForMe Cc:

Description

When FCKEditor appears on an aspx / ASP.Net page which also uses an UpdatePanel, an error sometimes occurs on postback. The error text is as follows: WebForms.PageRequestManagerServerErrorException: Status code 500

The error occurs when the FCKEditor control has content rendered in HTML.

I found the following fix at ASP.Net's forum...

I resolved it by adding ValidateRequest="false" in the tag <%@ Page ...%>

The page declaration can be set as follows... <%@ Page Language="VB" CodeFile="blah.aspx.vb" Inherits="blah" ValidateRequest="false" %>

After a little delving, I've discovered "why" the ValidateRequest=False trick works (for FCKEditor in an UpdatePanel). First of all, note the following about ValidateRequest:

Request validation, a feature of ASP.NET since version 1.1, prevents the server from accepting content containing un-encoded HTML. (from http://www.asp.net/learn/whitepapers/request-validation/)

I found that if my FCKEditor contains HTML then it fails the postback. I'm guessing that the FCKEditor does not pass "un-encoded HTML" back when it postsback. When I remove the HTML content from my FCKEditor, the error does not occur.

Attachments

TestBug#2399.zip (4.2 kB) - added by Pedantix 4 weeks ago.
ASP.Net project with FCKEditor in an UpdatePanel and a LinkButton that causes the error described in this note (FCKEditor files and DLL excluded to meet upload limit)

Change History

  Changed 5 weeks ago by Pedantix

  • component changed from General to Server : ASP.Net

follow-up: ↓ 3   Changed 5 weeks ago by alfonsoml

  • keywords Pending WorksForMe added

Are you using the latest versions of the .net component and the FCKeditor core?

That problem was fixed long ago in #294

in reply to: ↑ 2   Changed 4 weeks ago by Pedantix

Replying to alfonsoml:

Are you using the latest versions of the .net component and the FCKeditor core? That problem was fixed long ago in #294

Yes I'm using latest version of FCKEditor. This with ASP.Net 3.5.

Further testing, I've found that the error occurs with postbacks from LinkButtons rather than postbacks from Buttons and other controls.

I've attached a sample project, if you'd like to test it.

Changed 4 weeks ago by Pedantix

ASP.Net project with FCKEditor in an UpdatePanel and a LinkButton that causes the error described in this note (FCKEditor files and DLL excluded to meet upload limit)

Note: See TracTickets for help on using tickets.