Object 'reader' can be disposed more than once in method 'AsyncServiceClient.ReadCallBack<T>(Task<int>, AsyncState<T>)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 360
Provide an overridable implementation of Dispose(bool) on 'AsyncState<TResponse>' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'AsyncState<TResponse>.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on 'AsyncTimer' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'AsyncTimer.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Add [Serializable] to 'AuthenticationException' as this type implements ISerializable.
Provide an overridable implementation of Dispose(bool) on 'ServerEventsClient' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
'ServerEventsClient' contains field 'ServerEventsClient.cancel' that is of IDisposable type: 'CancellationTokenSource'. Change the Dispose method on 'ServerEventsClient' to call Dispose or Close on this field.
Modify 'ServerEventsClient.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
'ServiceClientBase.ServiceClientBase()' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences:
ServiceClientBase..ctor()
ServiceClientBase.get_ContentType():String
Modify 'ServiceClientBase.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Object 'responseStream' can be disposed more than once in method 'ServiceClientBase.HandleResponse<TResponse>(WebResponse)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 1355
'ServiceClientBase.PrepareWebRequest(string, string, object, Action<HttpWebRequest>)' rethrows a caught exception and specifies it explicitly as an argument. Use 'throw' without an argument instead, in order to preserve the stack location where the exception was initially raised.
Modify 'WcfServiceClient.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Add an implementation of GetObjectData to type 'WebServiceException'.
Provide an overridable implementation of Dispose(bool) on 'InMemoryMessageQueueClient' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'InMemoryMessageQueueClient.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on 'MessageQueueClientFactory' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'MessageQueueClientFactory.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on 'RedisMessageFactory' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'RedisMessageFactory.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on 'RedisMessageProducer' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'RedisMessageProducer.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on 'RedisMessageQueueClient' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'RedisMessageQueueClient.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on 'RedisMessageQueueClientFactory' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
Modify 'RedisMessageQueueClientFactory.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Object 'deflateStream' can be disposed more than once in method 'DataContractSerializer.CompressToStream<XmlDto>(XmlDto, Stream)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 106
Object 'stream' can be disposed more than once in method 'DataContractSerializer.CompressToStream<XmlDto>(XmlDto, Stream)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 106
Object 'ms' can be disposed more than once in method 'DataContractSerializer.Parse<XmlDto>(XmlDto, bool)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 64
Object 'ms' can be disposed more than once in method 'JsonDataContractSerializer.SerializeToString<T>(T)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 43
Object 'ms' can be disposed more than once in method 'XmlSerializableSerializer.SerializeToString<XmlDto>(XmlDto)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 29
Object 'ms' can be disposed more than once in method 'NetDeflateProvider.Deflate(string)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 21
Object 'zipStream' can be disposed more than once in method 'NetDeflateProvider.Deflate(string)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 21
Object 'compressedStream' can be disposed more than once in method 'NetDeflateProvider.Inflate(byte[])'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 31
Object 'compressedStream' can be disposed more than once in method 'NetGZipProvider.GUnzip(byte[])'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 30
Object 'ms' can be disposed more than once in method 'NetGZipProvider.GZip(string)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 20
Object 'zipStream' can be disposed more than once in method 'NetGZipProvider.GZip(string)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 20
Add [Serializable] to 'ValidationError' as this type implements ISerializable.
Disposable fields should be disposed
If a type that implements IDisposable owns fields that also implement IDisposable, the encapsulating type's Dispose() implementation should call Dispose() on each disposable field.
{0} contains field {1} that is of IDisposable type: {2}. Change the Dispose method on {0} to call Dispose or Close on this field.
http://msdn.microsoft.com/library/ms182328(VS.100).aspx
[none]
Warning
Do not dispose objects multiple times
A correctly implemented Dispose method can be called multiple times without throwing an exception. However, this is not guaranteed and to avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.
Object {0} can be disposed more than once in method {1}. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 30
RuleOwner
http://msdn.microsoft.com/library/ms182334(VS.100).aspx
Warning
Do not call overridable methods in constructors
Virtual methods defined on the class should not be called from constructors. If a derived class has overridden the method, the derived class version will be called (before the derived class constructor is called).
{0} contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: {1}
http://msdn.microsoft.com/library/ms182331(VS.100).aspx
[none]
CriticalWarning
Implement IDisposable correctly
All IDisposable types should implement the Dispose pattern correctly.
Modify {0} so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.
Provide an overridable implementation of Dispose(bool) on {0} or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.
http://msdn.microsoft.com/library/ms244737(VS.100).aspx
[none]
Error
Implement ISerializable correctly
If a type is assignable to ISerializable, it should implement GetObjectData. For unsealed types, the GetObjectData method should be callable and overridable by derived types.
Add an implementation of GetObjectData to type {0}.
http://msdn.microsoft.com/library/ms182342(VS.100).aspx
[none]
Error
Mark ISerializable types with SerializableAttribute
The System.Runtime.Serialization.ISerializable interface allows the type to customize its serialization, while the Serializable attribute enables the runtime to recognize the type as being serializable.
Add [Serializable] to {0} as this type implements ISerializable.
http://msdn.microsoft.com/library/ms182350(VS.100).aspx
[none]
Warning
Rethrow to preserve stack details
Use the IL rethrow instruction to preserve original stack details when re-raising a caught exception.
{0} rethrows a caught exception and specifies it explicitly as an argument. Use 'throw' without an argument instead, in order to preserve the stack location where the exception was initially raised.
http://msdn.microsoft.com/library/ms182363(VS.100).aspx
[none]
Error
Category
Certainty
Collapse All
Check Id
Error
error(s)
Expand All
Help
Line
message(s)
[Location not stored in Pdb]
Project
Resolution
Rule
Rule File
Rule Description
Source
Status
Target
Warning
warning(s)
Code Analysis Report