Saturday, March 24, 2012

Exception / Error 500 on using UpdatePanel and postback of value starting with "less than"

We are using the December, 19, release of AJAX CTP (and Control Toolkit) and are noticing the following behaviour:

If you are putting for example a TextBox into an UpdatePanel, filling the box with a value like "<x" and do a postback of that value then you will receive the following error message:

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

If you use empty braces (<>) everything works fine, if you uses only the closing brace (>) there is also no problem.

Does anybody have more detailed information on this problem or how to avoid it?

Regards,
ReneMT

put validaterequest="false" in the <%@. %> at the top.

NOTE: when you do this you must provide your own validation, because leave it out might introduce security risks of scripts injecting attacks.


Hmmm...

That may be a solution - but I think basically this is no real good one (as you are already pointing out) [:-)]. I thought about something like HTML encoding for postback values... Any possibilities in this direction?

ReneMT


hello.
well, not out of the box. btw, this is not an ajax problem...if you build a simple asp.net page, you'llget the same results.

Arrrrrrgh...

If this is a fact it is really sadIndifferent So in my eyes the only workaround were

Forbid input of the "<" sign or

I'm posting this response at the root because it may be beneficial...

I tried all the methods discussed here, but then I ran across a different thread in which they were running into a problem with all 3 releases (AJAX 1.0, CTPs, Atlas) where physical file names did not match up with the file name in the URL. Of course this can happen anytime you do a postback and the associated Code Behind (CB) page flips you out to a different page without updating the URL in the browser.

So my fix didn't involve any fix at all. I just went to the actual page (instead of being flipped over there by my CB code) andw00t! everything is kosher. I also tried using symbols discussed here (my AJAX dll versions are 1.0) and I verified that ICANput symbols in text fields with no resulting errors.

Please let me know if this is confusing.


I have a related problem with the TImer control in Ajax. I inject a <br> tag into a READ-ONLY text box, but when the Timer refreshes the TextBox I get the same error. Seehttp://forums.asp.net/thread/1626704.aspx

Ivan


I'm suddenly having this problem with FireFox 2.0.0.3. If my editor/textarea contains only text, good, if it's HTML - no go. Tried the ValidateRequest="false" hack, it did kinda work, but I ended up with firefox sending the old values from the textarea!

Anyone else working on this?


Any updates or fix on this issue?

No comments:

Post a Comment