On a computer that is running the Microsoft .NET Framework 3.5 Service Pack 1 (SP1), you have an application that serializes and deserializes a generic class. If the generic class has at least one static member, you may encounter one of the following symptoms:
- If the application is running as a 32-bit process, the thread that performs the deserialization may enter a loop. Therefore, the application fails, and the application consumes lots of CPU resources.
- If the application is running as a 64-bit process, an exception is thrown, and you receive an error message that resembles the following:Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
- You enable View State for a control.
- The control has a property the type of which is based on a generic class that has at least one static member.