objectdisposedexception Questions

14

Solved

I have a very strange behavior that only seems to happen on one form. Basically I am creating an instance of a Form, and calling Show() to display the form non-blocking. In that form's Load event...
Fagot asked 8/4, 2009 at 17:51

4

My game window has manual resizing allowed, which means it can be resized like any other normal window, by dragging its edges. The game also makes use of a RenderTarget2D rt2d, to which the main Re...
Octofoil asked 25/4, 2013 at 22:19

3

Solved

I am using the following code: private WSHttpBinding ws; private EndpointAddress Srv_Login_EndPoint; private ChannelFactory<Srv_Login.Srv_ILogin> Srv_LoginChannelFactory; private Srv_Login.S...
Conciliatory asked 1/1, 2011 at 8:13

5

Solved

I create a MemoryStream, pass it to CryptoStream for writing. I want the CryptoStream to encrypt, and leave the MemoryStream open for me to then read into something else. But as soon as CryptoStrea...
Apiculture asked 1/11, 2013 at 22:47

3

Solved

I have a C# windows forms application which communicates with a USB dongle via a COM port. I am using the SerialPort class in .Net 2.0 for communication, and the serial port object is open for the ...
Bordeaux asked 19/1, 2012 at 14:7

2

Solved

Good day. I work with UdpClient and have wrapper upon it. For reading I have asynchronous method: private async Task<byte[]> Receive(UdpClient client, CancellationToken breakToken) { // Вы...
Gingergingerbread asked 7/12, 2016 at 14:28

3

A question for you all. In my company, we are developing an application that runs inside Microsoft’s MVC framework. The controller classes that we are implementing inherit from the MVC base class ...
Hiding asked 5/7, 2014 at 7:27

2

Solved

I've recently encountered an error "ObjectDisposedException: Cannot access a closed Stream" [ObjectDisposedException: Cannot access a closed Stream.] System.IO.MemoryStream.Write(Byte[] buffer, I...
Clemons asked 18/4, 2014 at 21:53

2

Solved

I've been debugging this program without any result, and unfortunately I can't see the root of the problem. I get this exception: The ObjectContext instance has been disposed and can no longer be u...
Tripura asked 18/3, 2013 at 19:50

1

Solved

I have a problem with HTMLWorker.Parse From iTextSharp in a Windows Form program. Everytime when I excecute the code and it starts with the HTMLWorker.Parse, it gives the objectDisposedException....
Unloose asked 3/9, 2012 at 10:18

2

Solved

I am using a .NET 4 SerialPort object to talk to a device attached to COM1. When I am done with the device, I call Close on the SerialPort. I do not call Dispose, but I believe that Close and Disp...
Repetitious asked 18/8, 2011 at 20:43

2

Solved

I'm having a weird problem with my program. I'm developing a windows form application. When I debug it through Visual Studio (F5) it works perfectly correctly, but when I run its executable it cras...
Bloem asked 30/7, 2011 at 21:54

4

Solved

Is there any point in keeping track of the classic bool disposed field on an otherwise threadsafe type for the purposes of conditionally throwing an ObjectDisposedException at the beginning of all ...
Displant asked 11/2, 2010 at 18:28

5

Solved

In a class that implements IDisposable, when is it reasonable to check if the object has been disposed and throw ObjectDisposedException if it has? In all public methods and properties (except Disp...
Cathern asked 27/5, 2011 at 9:38

4

Solved

I'm building a 4 layered ASP.Net web application. The layers are: Data Layer Entity Layer Business Layer UI Layer The entity layer has my data model classes and is built from my entity data mod...

2

Solved

Consider the following function: private int GetSomethingFromFile(FileStream fs) { using (BinaryReader br = new BinaryReader(fs)) { fs.Seek(0, SeekOrigin.Begin); return br.ReadInt32(); } ...
Stretcher asked 10/3, 2011 at 14:32

3

Solved

When implementing IDisposable, I undertand that every method that shouldn't be called after the object's been disposed should throw the ObjectDisposedException. But what is the standard for the nam...
Names asked 26/12, 2009 at 22:7
1

© 2022 - 2024 — McMap. All rights reserved.