ObjectExposedException was unhandled by user code
This is the error I am getting when I try to load a page in the web browser. I am not sure if I am getting it cause I am loading the site beforehand in the background on a different web browser or what?:
System.ObjectDisposedException was unhandled by user code
Message: Cannot access a disposed object.
Object name: 'WebBrowser'.
Re: ObjectExposedException was unhandled by user code
And this is what I get when I view the details of the error:
The name '$exception' does not exist in the current context
Re: ObjectExposedException was unhandled by user code
Apparently you have some code trying to access $exception which has not been defined in the current context.
Re: ObjectExposedException was unhandled by user code
Actually, that sounds like a message from the Watch window of the debugger.
More importantly: kytro360, if you look closer, it's not an ObjectExposedException, but an ObjectDisposedException.
Quote:
Originally Posted by
kytro360
System.ObjectDisposedException was unhandled by user code
Message: Cannot access a disposed object.
Object name: 'WebBrowser'.
Which means you're trying to access an unmanaged resource after it's been disposed of. Make sure you're using your objects properly. You may need to recreate the disposed objects, or make sure they are not disposed to soon.
(The objects for which you still have references are disposed explicitly either by calling Dispose() on them, or by wrapping them in a using block. Also, container objects might call Dispose() on their components, when disposing themselves; you may need to check the docs, depending on what your code uses.)