473,387 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

OverlappedAsyncResult what class uses this?

Hello,

I have the following exception in my app, have been chasing it up for the
past few days none to avail. Help does anyone know what this may be?

Unhandled Exception: System.IO.IOException: Unable to read data from the
transpo
rt connection. ---> System.ObjectDisposedException: Cannot access a disposed
obj
ect.
at System.Threading.ManualResetEvent.Reset()
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.InvokeCallback()
at System.Net.LazyAsyncResult.InvokeCallback(Boolean
completedSynchronously,
Object result)
at System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32
err
orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)

thanks,

/m
Nov 15 '05 #1
6 4738
Got it. Post it here so if other people search for it will be found.

I am using XmlDocument.LoadXml(...) this apparently validate the DTD and
tried to download the DTD as well. My gut feel is that since the nature of
our applicatoin has hundreds of thousands of objects created in a short
amount of time, the validating of DTD is using an ansynchrounous process or
some sort. And internally it's using weak reference thus when the result
came back it throws the ObjectDisposedException.

Hmmph not sure if this is true or not, like I said this is just a gut feel
:) I didn't know c# well enough :) Anyway I disable the checking of the DTD
and this exception dissapear.
/m
"Muscha" <mu****@no.spam.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I have the following exception in my app, have been chasing it up for the
past few days none to avail. Help does anyone know what this may be?

Unhandled Exception: System.IO.IOException: Unable to read data from the
transpo
rt connection. ---> System.ObjectDisposedException: Cannot access a disposed obj
ect.
at System.Threading.ManualResetEvent.Reset()
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.InvokeCallback()
at System.Net.LazyAsyncResult.InvokeCallback(Boolean
completedSynchronously,
Object result)
at System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32 err
orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)

thanks,

/m

Nov 15 '05 #2
To add to your response.
Overlapped IO is a win32 async IO model, in this case it appears to be using
Completion Ports, which is a type of async commuincation model often used in
networking apps(although they can work on files, IIRC). The exception
appears to be occuring in a CompletionPort callback where a ManualResetEvent
somewehre is being disposed before the loading is complete. If you need
validation, you may want to read the entire stream into memory yourself (via
StreamReader or something) and then loading it into the XmlDocument from the
local stream.
This code most likely exists in most, if not all System.Net calls, its odd
that this is occuring in your case, can you repo it in another case?

"Muscha" <mu****@no.spam.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I have the following exception in my app, have been chasing it up for the
past few days none to avail. Help does anyone know what this may be?

Unhandled Exception: System.IO.IOException: Unable to read data from the
transpo
rt connection. ---> System.ObjectDisposedException: Cannot access a disposed obj
ect.
at System.Threading.ManualResetEvent.Reset()
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.InvokeCallback()
at System.Net.LazyAsyncResult.InvokeCallback(Boolean
completedSynchronously,
Object result)
at System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32 err
orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)

thanks,

/m

Nov 15 '05 #3
> To add to your response.
Overlapped IO is a win32 async IO model, in this case it appears to be using Completion Ports, which is a type of async commuincation model often used in networking apps(although they can work on files, IIRC). The exception
appears to be occuring in a CompletionPort callback where a ManualResetEvent somewehre is being disposed before the loading is complete. If you need
validation, you may want to read the entire stream into memory yourself (via StreamReader or something) and then loading it into the XmlDocument from the local stream.
This code most likely exists in most, if not all System.Net calls, its odd
that this is occuring in your case, can you repo it in another case?
Hmm not really, this is where it happens at the moment. The way I do this
XmlDocument loading is like this:

- download the document.
- store the document
- load from store
- load string into XmlDocument object.

I know XmlDocument can load using the stream, but for our case we needed the
document to be downloaded first, stored and then reload it as XmlDocument.

/m


"Muscha" <mu****@no.spam.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I have the following exception in my app, have been chasing it up for the past few days none to avail. Help does anyone know what this may be?

Unhandled Exception: System.IO.IOException: Unable to read data from the
transpo
rt connection. ---> System.ObjectDisposedException: Cannot access a

disposed
obj
ect.
at System.Threading.ManualResetEvent.Reset()
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.InvokeCallback()
at System.Net.LazyAsyncResult.InvokeCallback(Boolean
completedSynchronously,
Object result)
at

System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32
err
orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)

thanks,

/m


Nov 15 '05 #4

"Muscha" <mu****@no.spam.net> wrote in message
news:Of**************@tk2msftngp13.phx.gbl...
To add to your response.
Overlapped IO is a win32 async IO model, in this case it appears to be using
Completion Ports, which is a type of async commuincation model often used in
networking apps(although they can work on files, IIRC). The exception
appears to be occuring in a CompletionPort callback where a ManualResetEvent
somewehre is being disposed before the loading is complete. If you need
validation, you may want to read the entire stream into memory yourself

(via
StreamReader or something) and then loading it into the XmlDocument from

the
local stream.
This code most likely exists in most, if not all System.Net calls, its odd that this is occuring in your case, can you repo it in another case?


Hmm not really, this is where it happens at the moment. The way I do this
XmlDocument loading is like this:

- download the document.
- store the document
- load from store
- load string into XmlDocument object.

I know XmlDocument can load using the stream, but for our case we needed

the document to be downloaded first, stored and then reload it as XmlDocument.

Ahh, I see. Does the document have a schema reference that an XmlResolver
may be trying to resolve?
/m


"Muscha" <mu****@no.spam.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I have the following exception in my app, have been chasing it up for

the past few days none to avail. Help does anyone know what this may be?

Unhandled Exception: System.IO.IOException: Unable to read data from the transpo
rt connection. ---> System.ObjectDisposedException: Cannot access a

disposed
obj
ect.
at System.Threading.ManualResetEvent.Reset()
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.InvokeCallback()
at System.Net.LazyAsyncResult.InvokeCallback(Boolean
completedSynchronously,
Object result)
at

System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32
err
orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)

thanks,

/m



Nov 15 '05 #5
> > Hmm not really, this is where it happens at the moment. The way I do
this
XmlDocument loading is like this:

- download the document.
- store the document
- load from store
- load string into XmlDocument object.

I know XmlDocument can load using the stream, but for our case we needed the
document to be downloaded first, stored and then reload it as XmlDocument.


Ahh, I see. Does the document have a schema reference that an XmlResolver
may be trying to resolve?


Yes it does, however it escapes me how it can throw object disposed
exception .. ?

/,

/m


"Muscha" <mu****@no.spam.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I have the following exception in my app, have been chasing it up
for the
> past few days none to avail. Help does anyone know what this may be?
>
> Unhandled Exception: System.IO.IOException: Unable to read data from

the > transpo
> rt connection. ---> System.ObjectDisposedException: Cannot access a
disposed
> obj
> ect.
> at System.Threading.ManualResetEvent.Reset()
> at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
> --- End of inner exception stack trace ---
> at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
> at System.Net.LazyAsyncResult.InvokeCallback()
> at System.Net.LazyAsyncResult.InvokeCallback(Boolean
> completedSynchronously,
> Object result)
> at
System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32
> err
> orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
>
> thanks,
>
> /m
>
>



Nov 15 '05 #6

"Muscha" <mu****@no.spam.net> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
Hmm not really, this is where it happens at the moment. The way I do this XmlDocument loading is like this:

- download the document.
- store the document
- load from store
- load string into XmlDocument object.

I know XmlDocument can load using the stream, but for our case we needed
the
document to be downloaded first, stored and then reload it as XmlDocument.
Ahh, I see. Does the document have a schema reference that an XmlResolver
may be trying to resolve?


Yes it does, however it escapes me how it can throw object disposed
exception .. ?


Well, the exact reasoning is not clear to me either, if you dig down into
the framework with Reflector you might be able to determine it, but it may
be a framework issue. It is possible that somewhere down deep in the system
there is a bug that is referencing a disposed object on the return of an
async call, however it is potentially due to user error(however, logically,
that kind of error should probably be handled in the class and thrown as a
more descriptive error).
/,

/m
>
> "Muscha" <mu****@no.spam.net> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
> > Hello,
> >
> > I have the following exception in my app, have been chasing it up for the
> > past few days none to avail. Help does anyone know what this may

be? > >
> > Unhandled Exception: System.IO.IOException: Unable to read data from the
> > transpo
> > rt connection. ---> System.ObjectDisposedException: Cannot access

a > disposed
> > obj
> > ect.
> > at System.Threading.ManualResetEvent.Reset()
> > at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
> > --- End of inner exception stack trace ---
> > at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
> > at System.Net.LazyAsyncResult.InvokeCallback()
> > at System.Net.LazyAsyncResult.InvokeCallback(Boolean
> > completedSynchronously,
> > Object result)
> > at
> System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32 > > err
> > orCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
> >
> > thanks,
> >
> > /m
> >
> >
>
>



Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: VincentWong | last post by:
hi all, We're getting a security exception (An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll) on a asychronous...
4
by: Thomas Johansen | last post by:
Hi. I have an DLL written as "normal" C++ dll. I has an GetObject function, which return an c++ class. Now I whant to use this class (and all its members) in my C# applikation. I know that C#...
1
by: Jose | last post by:
Hello: I'm preparing a multitier application, and in the Data Layer I have a EmployeeRepositoryBase class that has a protected static method called Fill() and some GetAll() overloaded protected...
7
by: Michael D. Ober | last post by:
Is there anyway to raise an event from a class and require that any program using that class (not just inheritance) have an event handler for specific events in the class? In my case, some events...
3
by: danilo.horta | last post by:
Hi guys I'm trying to accomplish a slightly difficult task. I think it's more easy to explain trought an unworking code: template<class T, size_t numDim> VecBasis {/*...*/}; typedef...
6
by: Vladislav Kosev | last post by:
I have this strange problem now twice: I am writing this relatevely large web site on 2.0 and I made a static class, which I use for url encoding and deconding (for remapping purposes). This static...
6
by: Gaijinco | last post by:
I have always felt that there are a lot of topics that you learned the facts but you only grasp the matter sometime down the road. For me, two of those topics are inner classes and anonymous...
15
by: akomiakov | last post by:
Is there a technical reason why one can't initialize a cost static non- integral data member in a class?
4
by: AliR \(VC++ MVP\) | last post by:
Hi everyone, I'm writing a silverlight 2.0 application that uses a web service. The web service is a WCF web service and it uses a class library that I have written. When I add a method to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.