IE9:Error c00c023f

1,371 views
Skip to first unread message

perbit

unread,
May 5, 2011, 8:24:00 AM5/5/11
to WebSync
Hello,

this issue has been reported before but none ot the suggested
solutions seem to work for me.

I have a page where a WebSync client is connected to the server and is
subscribed to one channel. In the page's unload event I disconnect the
client. However, right after the disconnect call the JavaScript error
occurs: Could not completete operation due to error c00c023f. This
happens only in IE9. Unlike reported elsewhere, the error occurs all
the time, not just in the Visual Studio debugger. I've tried
everything now, but I am still not able to find a suitable work
around. If this cannot be fixed, we have to remove WebSync from our
product, so any hint what to do would be very appreciated... Thanks in
advance.

Jerod Venema

unread,
May 5, 2011, 8:35:58 AM5/5/11
to web...@googlegroups.com
Have you tried moving the code to the "beforeunload" event instead? 

Also, you can also add "suppressErrors:true" to the disconnect call.
 
Let me know if either of those options works.

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to websync+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/websync?hl=en.




--
Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
(w) 919-300-5141
(c) 919-368-5105

perbit

unread,
May 5, 2011, 9:27:51 AM5/5/11
to WebSync
Thank you for your quick response. Unfortunately neither of your
suggestions worked. I tried this but got the same error message as
before:

var client = this._client;
window.onbeforeunload = function()
{
client.disconnect( { suppressErrors: true } );
};

Any other idea what's wrong here? We're using Microsoft ASP.NET Ajax,
IE9 32 Bit, IIS7, Win7 64 Bit.

On 5 Mai, 14:35, Jerod Venema <jerod.ven...@frozenmountain.com> wrote:
> (c) 919-368-5105- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Jerod Venema

unread,
May 5, 2011, 9:39:10 AM5/5/11
to web...@googlegroups.com
Can you try:

client.disconnect({ suppressErrors: true, sync: true });

...and see what happens?

perbit

unread,
May 5, 2011, 10:22:27 AM5/5/11
to WebSync
Unfortunatelly, this doesn't do the trick either. The only thing that
helps right now is when I disconnect and then wait for some time. Do
you provide some kind of callback that's invoked when the disconnect
is complete?

Jerod Venema

unread,
May 5, 2011, 10:23:48 AM5/5/11
to web...@googlegroups.com
On Thu, May 5, 2011 at 10:22 AM, perbit <markus...@gmail.com> wrote:
Unfortunatelly, this doesn't do the trick either. The only thing that
helps right now is when I disconnect and then wait for some time. Do
you provide some kind of callback that's invoked when the disconnect
is complete?

The "onSuccess" callback of the disconnect, yep.

Is it critical to your application that the users disconnect immediately when the browser session ends? If not, they'll be idled out within 30 seconds or so anyway...



--
Jerod Venema

perbit

unread,
May 5, 2011, 10:35:11 AM5/5/11
to WebSync
No, I think that would be fine. The only problem I see is that when a
user navigates to another site, he or she will get the JavaScript
error.

I'm just wondering, am I doing something wrong here or is this a known
issue with the IE9?



On 5 Mai, 16:23, Jerod Venema <jerod.ven...@frozenmountain.com> wrote:

Jerod Venema

unread,
May 5, 2011, 10:38:44 AM5/5/11
to web...@googlegroups.com
On Thu, May 5, 2011 at 10:35 AM, perbit <markus...@gmail.com> wrote:
No, I think that would be fine. The only problem I see is that when a
user navigates to another site, he or she will get the JavaScript
error.

If you don't have the disconnect code, *at all*, the error goes away though, right?
 

I'm just wondering, am I doing something wrong here or is this a known
issue with the IE9?

To be honest, I'm not sure; we've had a couple reports of it (as you've seen on the GG), but never been able to reproduce it (I've got IE9 here, and it works like a champ) and the reports have been varied (only shows during debugging, etc).

If you have a simple test case that can reproduce it consistently....



--
Jerod Venema

perbit

unread,
May 9, 2011, 10:39:18 AM5/9/11
to WebSync
First of all, I apologize for the late reply. Had some other stuff to
attend to first...

> If you don't have the disconnect code, *at all*, the error goes away though,
> right?

Unfortunately not. The error is always there.

> If you have a simple test case that can reproduce it consistently....

You can use the following ASPX page to reproduce the error. There's
nothing in the code behind file so this contains all the information
you need to reproduce the error. Simply load the page in IE9 and then
navigate away.


<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Test.aspx.cs" Inherits="Perbit.Web.Test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>

<script type="text/javascript">

function pageLoad( sender, args )
{
window._pushClient = fm.websync.client.initialize( { retries:
0, autoDisconnect: false } );
window._pushClient.connect( {
onSuccess: Function.createDelegate( this, function( args )
{
subscribe();
} )
} );
}

function subscribe()
{
window._pushClient.subscribe( {
channel: "/systemmessage",
onSuccess: Function.createDelegate( this, function( args )
{
alert( "subscribed" );
} ),
onReceive: Function.createDelegate( this, function( args )
{
alert( "data: " + args.data );
} ),
onFailure: Function.createDelegate( this, function( args )
{
alert( "error" );
} )
} );
}

</script>

</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="client.ashx" />
</Scripts>
</asp:ScriptManager>
</form>
</body>
</html>


Jerod Venema

unread,
May 9, 2011, 12:02:21 PM5/9/11
to web...@googlegroups.com
Awesome, thanks for the info.

It turns out this only happens if you've got the standards and IE9 rendering modes both set (hence my inability to reproduce it at first - thank goodness for the dev tools in IE now), and you've got all script errors on, so the good news is that this won't be a problem for 99% of your users (unless they're running with script debugging on, which is *not* the default in IE9).

For those who are interested in what the problem was: it shows up because an aborted request comes through with a readyState of "4", which is the same state as "successful", and we were processing it as such (intentionally - we check later for successful completion). However, in IE9, when you abort during an unload, the status, etc, doesn't get set properly, and when you try and read it an exception is thrown. We're now flagging requests in the unload event before they're aborted and ignoring them.

We've got it fixed, and it'll go out with the next version. As mentioned, this is really only a bug developers are going to see, as they're the only people who run with debugging enabled.



--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to websync+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/websync?hl=en.

blackadder

unread,
May 10, 2011, 2:47:17 PM5/10/11
to WebSync
Will that version be 3.4.2? Do you have any idea of a time frame for
the next release?

On May 9, 12:02 pm, Jerod Venema <jerod.ven...@frozenmountain.com>
wrote:
> Frozen Mountain Softwarehttp://www.frozenmountain.com/
> (w) 919-300-5141
> (c) 919-368-5105

Jerod Venema

unread,
May 10, 2011, 2:54:07 PM5/10/11
to web...@googlegroups.com
On Tue, May 10, 2011 at 2:47 PM, blackadder <mdblac...@gmail.com> wrote:
Will that version be 3.4.2? Do you have any idea of a time frame for
the next release?

It will be, and towards the end of next week at the moment.

enotifyswi...@gmail.com

unread,
Feb 8, 2013, 8:22:27 AM2/8/13
to web...@googlegroups.com, jerod....@frozenmountain.com
Hi Jerod,

             I am facing the same issue.
             However i have already used
  
          var client = this._client;
             window.onbeforeunload = function()
               {
                    client.disconnect( { suppressErrors: true } );
               };

              Yes, Earlier i was using IE9 in debug mode (without disable script debugging).

              But with disable script debugging in IE, I am getting the same issue "Could not complete the operation due to error c00c023f".

              I am using websync with loadbalancer. However websync with loadbalancer seems to be working fine in all browsers except IE9.
          
              I am using 3.0.5.14 version of the websync.

              Please suggest me something regarding this.

Thanks in advance.
Sunny.

Jerod Venema

unread,
Feb 8, 2013, 8:32:05 AM2/8/13
to enotifyswi...@gmail.com, web...@googlegroups.com
Hey Sunny,

You're using a very old version - 3.0.* is quite old.

Try upgrading. You can confirm which exact version you've got by browsing to /client.ashx on your project.

Best,

enotifyswi...@gmail.com

unread,
Feb 11, 2013, 8:18:34 AM2/11/13
to web...@googlegroups.com, enotifyswi...@gmail.com
Sorry, Actually i am using /* WebSync Client, Version 3.5.0 */ version of the websync. But still facing the same issue.
Should i try with 4.0 version of the websync or anything else.
Please suggest.

Thanks,
Sunny.

Jerod Venema

unread,
Feb 11, 2013, 8:48:02 AM2/11/13
to web...@googlegroups.com, enotifyswi...@gmail.com
I'd check to make sure you've got the fix in your code, to ensure there's nothing crazy going on.

1) Browse to client.ashx?debug=1
2) Search for c00c023f; you should see:

// don't read xhr properties if request was aborted
// to avoid c00c023f errors in IE
var status, responseText;
if (aborting) {
This is the fix for that error; IE still fires events when requests are aborted, but if you attempt to read any properties you get that error. The fix above should resolve it. If not, there's something else going on :)

To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.

To post to this group, send email to web...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/AyUZbbg8eXMJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages