7/06/2006

System error: -1072896658 in IE

Problem:
Recently my team reported a problem while integrating one of the Ajax features I developed. Whenever they try to access that feature, it throws up an error "System error: -1072896658". I was suprised because that is working fine when I access in my test environment. Later after debugging in the integration environment, I found out that the problem is with charset. While configuring the server environment, they mistakenly specified the charset as "UTF8" (instead of utf-8) and that is the culprit of this error. So, whenever the response is received in the browser and accessed using xhr.responseText, MSXMl.dll (MSXML component) is not able to interpret the response and throwing a system error.

Solution:
By changing the charset to "utf-8", it started working absolutely fine.

Conclusion:
Make sure to specify the correct charset.

20 comments:

Anonymous said...

I also am getting this error (intermittently) when using MSXML or WinHTTP to download HTML pages from pbase.com. The files are HTML, not XML, and sometimes trying to retrieve the .ResponseText property triggers this error.

I resolved it by reading the Byte Array .ResponseBody instead, and writing it character by character into a string.

If you get this error when trying to read the .ResponseText property, try this instead:

Dim sURI as string
Dim HTMLReq as MSXML2.XMLHTTP40

sURI="http://www.mysite.com"
With HTMLReq
  .Open "GET", sURI, False
  .send
End With

' Manually build the ResponseText
Dim c
Dim sResponseText As String
sResponseText = ""
For Each c In HTMLReq.responseBody
 sResponseText = sResponseText & Chr$(c)
Next

Anonymous said...

charset=utf8 is also wrong :-(

Rodrigo said...

Thanks, Gosh!
I found your post via Google and it has made my day!

So, I was using UTF-8 (all upper case) and switched to utf-8 (all lower case).
Aaaand... woa! Our "beloved" IE just stopped displaying the weirdo and stupid -1072896658 error message and my AJAX call worked as expected! =)

Thanks again!

C said...

Hi, I had that exact error on php.ini
Thanks to you, it's solved now.

I knew that the problem had to be related with charset. Last day, I changed a lot of things about charset.

Now a question, witch debug do you used/use when you discovered the problem?

Marty said...

I can't get no love...

3 weeks ago my JSP ajax demo was working fine. Today i'm getting that error.... nothing was changed... and I'm not specifying a charset anywhere...

Adding one in doesn't seem to help either...

EscapeArtist said...

Anyone has a good solution for this ?

I use J2EE and if I write directly to response via the OutputStream works fine if I redirect the rendering to a JSP is not working...

Still digging!

Anonymous said...

Hi I just had the same problem.

My Java Server Page makes an AJAX call to another Java Server Page.

I was getting the Systems Error Message in the:

var response = xmlHttp.responseText;

To Solve the problem, In the JSP that generates the AJAX response I did two things:

I added this at the top of the JSP:
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
and then I set the content type to UTF-8.

response.setContentType("text/xml;charset=UTF-8");

admin@admin.com said...

all in lower case! :)
cool thanks

Anonymous said...

THANK YOU FOR THIS POST!

Another hint for PHP-Users:

header('content-type: text/html; charset=utf-8');

Anonymous said...

Apenas para agradecer.
resolveu meu problema.

Obrigado!!!!!

João said...

Thanks, man...

rjml said...

Thanks for this USEFUL post.

I had other issues with jquery ajax ie, before having this issue.
I resolved all, but when a system error appears. SYSTEM ERROR? Whatever...

So i google and got here.

And you solved my day.
Speccially when i am doing an huge project with in a very short time, and still want to make it good to the client.

Anyway....
Just to say thanks

Anonymous said...

THANK YOU!

Anonymous said...

This page deserves to be better referenced. I had the same problem using explorer7 ("System error: -1072896658") in all my applications while firefox was doing fine. I had to change "utf8" into "utf-8" in my php.ini as indicated, then everything was working fine again.
Thanks.

Web Design Toronto said...

Found this post when I got this error in VBA. Nothing I can really do about this though for mine except move on. Only one page causes the error. Still looking if there is some workaround though.

generic viagra online said...

Thank you for sharing to us.there are many person searching about that now they will find enough resources by your post.I would like to join your blog anyway so please continue sharing with us

COLUMBUS NEWS said...

love it :O) Must admit that you are one of the best bloggers I ever saw. Thanks for posting such informative content. Keep posting.

Anonymous said...

Bouyaka !

Ling said...

Thanks, you saved my day!

Generic viagrabuy said...

The things you describe is really appreciate please keep sharing such a post with us!!
Generic Viagra buy
Generic Viagra
Tadalis SX
Generic Viagra
Sildenafil citrate
Caverta
Kamagra
Online buy Generic Viagra