Try Playground
Show / Hide Table of Contents

Class ConnectionException

This exception is thrown whenever the connection with cache server is lost while performing an operation on an outproc cache.

Inheritance
System.Object
CacheException
OperationFailedException
ConnectionException
Inherited Members
OperationFailedException.IsTracable
CacheException.ErrorCode
CacheException.StackTrace
CacheException.ToString()
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public class ConnectionException : OperationFailedException
Examples

The following example demonstrates how to use this exception in your code.

try
{
    Cache cache = NCache.InitializeCache("sampleCache");
    cache.Add("TestKey","sampleData");
}
catch(ConnectionException ex)
{

}

Constructors

Name Description
ConnectionException()

Default constructor.

ConnectionException(SerializationInfo, StreamingContext)

Overloaded constructor, manual serialization.

ConnectionException(Int32)

Overloaded constructor

ConnectionException(Int32, System.Net.IPAddress, Int32)

Overloaded constructor

ConnectionException(Int32, String)

Overloaded constructor

ConnectionException(Int32, String, System.Net.IPAddress, Int32)

Overloaded constructor

ConnectionException(Int32, String, String)

Overloaded constructor

ConnectionException(System.Net.IPAddress, Int32)

Overloaded constructor, takes the ipAddress and port as parameter.

ConnectionException(String)

Overloaded constructor, takes the reason as parameter.

ConnectionException(String, System.Net.IPAddress, Int32)

Overloaded constructor, takes the reason, ipAddress and port as parameter.

Properties

Name Description
IPAddress

IPAddress of broken connection

Port

Port of broken connection

Back to top Copyright © 2017 Alachisoft