Tuesday, December 30, 2008

Easy solve the AJAX c00ce514 error

If your AJAX code runs smoothly on Mozilla Firefox but experiences problems when running on Internet Explorer and gives out an error:
"Could not complete the operation due to error c00ce514"

The error means that Microsoft XML Parser is having problems when parsing the AJAX response string.
Here is what to do: just set the proper character set encoding in your requested file then try again:)

PHP Example:

header("Content-type: text/html; charset=windows-1251");

Cheers!

10 comments:

philaweb said...

what if this is posting when I'm not attempting to load any items with AJAX?

Tim said...

Worked great for me, thanks!

Anonymous said...

This is due to you are using the Update panel in your applicaiton or on that page.

Do not use update panel it will work properly.

Most of the time this error comes while you are downloding code.

== Jagdeep Mankotia
YahooIM: jagdeepmankotia

Anonymous said...

worked for me. thanks :)

Anonymous said...

What if you're trying to load an image? That's my case and I don't know how to solve. Thanks for the help.

Nevyan Neykov said...

2 more possible reasons:
1. You'll have to close your image tag: ie.: <img src="http://yout_web_site.com/image.gif" />
2. When fetching images you'll need to set up your requested page header like this: <?php header('Content-Type: image/png'); ?>

Anonymous said...

solution that works for me was:
add the control that generates the event to PostBackTrigger in triggers section in Update Panel

Anonymous said...

Thanks, works for me :)

Anonymous said...

Hi Nevyan
I got this error when using XMLHTTP to call an ASP page, and the page tried to return accented characters etc. I tried messing with code pages but it didn't change anything. At last I figured out that Server.URLEncode was the solution. That way, XMLHTTP is guaranteed to receive only valid URL characters.

Anonymous said...

Thank You For The Solution..........

Subscribe To My Channel for updates

Burnout or toxic culture ?

Outsourcing companies are hell to be in for an experienced programmer, because managers are being allowed to mistakes, which are covered, th...