SqlPersistenceProviderFactory Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Note: This API is now obsolete.

A system-provided PersistenceProviderFactory implementation used to create a LockingPersistenceProvider instance that uses a SQL database to store persisted service state data.

Namespace:   System.ServiceModel.Persistence
Assembly:  System.WorkflowServices (in System.WorkflowServices.dll)

System.Object
  System.ServiceModel.Channels.CommunicationObject
    System.ServiceModel.Persistence.PersistenceProviderFactory
      System.ServiceModel.Persistence.SqlPersistenceProviderFactory

[ObsoleteAttribute("The WF3 types are deprecated.  Instead, please use the new WF4 types from System.Activities.*")]
public class SqlPersistenceProviderFactory : PersistenceProviderFactory

NameDescription
System_CAPS_pubmethodSqlPersistenceProviderFactory(NameValueCollection)

Initializes a new instance of the SqlPersistenceProviderFactory class, configured with the specified parameter collection.

System_CAPS_pubmethodSqlPersistenceProviderFactory(String)

Initializes a new instance of the SqlPersistenceProviderFactory class, configured with the specified connection string.

System_CAPS_pubmethodSqlPersistenceProviderFactory(String, Boolean)

Initializes a new instance of the SqlPersistenceProviderFactory class, configured with the specified connection string and serializeAsText parameters.

System_CAPS_pubmethodSqlPersistenceProviderFactory(String, Boolean, TimeSpan)

Initializes a new instance of the SqlPersistenceProviderFactory class, configured with the specified connection string, serializeAsText, and lockTimeout parameters.

NameDescription
System_CAPS_pubpropertyConnectionString

Gets the connection parameters for persistence provider instances created with this factory.

System_CAPS_protpropertyDefaultCloseTimeout

Gets the default time-out value used when persistence providers created with this factory are closed.(Overrides CommunicationObject.DefaultCloseTimeout.)

System_CAPS_protpropertyDefaultOpenTimeout

Gets the default time-out value used when persistence provider is opened.(Overrides CommunicationObject.DefaultOpenTimeout.)

System_CAPS_protpropertyIsDisposed

Gets a value that indicates whether the communication object has been disposed.(Inherited from CommunicationObject.)

System_CAPS_pubpropertyLockTimeout

The time-out for lock ownership used by persistence provider instances created by this instance. Locked instances are automatically unlocked after this time period.

System_CAPS_pubpropertySerializeAsText

Specifies whether data is serialized as text rather than binary in persistence providers created with this factory.

System_CAPS_pubpropertyState

Gets a value that indicates the current state of the communication object.(Inherited from CommunicationObject.)

System_CAPS_protpropertyThisLock

Gets the mutually exclusive lock that protects the class instance during a state transition.(Inherited from CommunicationObject.)

NameDescription
System_CAPS_pubmethodAbort()

Causes a communication object to transition immediately from its current state into the closing state.(Inherited from CommunicationObject.)

System_CAPS_pubmethodBeginClose(AsyncCallback, Object)

Begins an asynchronous operation to close a communication object.(Inherited from CommunicationObject.)

System_CAPS_pubmethodBeginClose(TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to close a communication object with a specified timeout.(Inherited from CommunicationObject.)

System_CAPS_pubmethodBeginOpen(AsyncCallback, Object)

Begins an asynchronous operation to open a communication object.(Inherited from CommunicationObject.)

System_CAPS_pubmethodBeginOpen(TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to open a communication object within a specified interval of time.(Inherited from CommunicationObject.)

System_CAPS_pubmethodClose()

Causes a communication object to transition from its current state into the closed state.(Inherited from CommunicationObject.)

System_CAPS_pubmethodClose(TimeSpan)

Causes a communication object to transition from its current state into the closed state within a specified interval of time.(Inherited from CommunicationObject.)

System_CAPS_pubmethodCreateProvider(Guid)

Initializes a new LockingPersistenceProvider instance that uses a SQL database as its persistence store.(Overrides PersistenceProviderFactory.CreateProvider(Guid).)

System_CAPS_pubmethodEndClose(IAsyncResult)

Completes an asynchronous operation to close a communication object.(Inherited from CommunicationObject.)

System_CAPS_pubmethodEndOpen(IAsyncResult)

Completes an asynchronous operation to open a communication object.(Inherited from CommunicationObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFault()

Causes a communication object to transition from its current state into the faulted state.(Inherited from CommunicationObject.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetCommunicationObjectType()

Gets the type of communication object.(Inherited from CommunicationObject.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnAbort()

Represents the Abort phase.(Overrides CommunicationObject.OnAbort().)

System_CAPS_protmethodOnBeginClose(TimeSpan, AsyncCallback, Object)

Represents the beginning of the Close phase.(Overrides CommunicationObject.OnBeginClose(TimeSpan, AsyncCallback, Object).)

System_CAPS_protmethodOnBeginOpen(TimeSpan, AsyncCallback, Object)

Represents the beginning of the Open phase.(Overrides CommunicationObject.OnBeginOpen(TimeSpan, AsyncCallback, Object).)

System_CAPS_protmethodOnClose(TimeSpan)

Represents the Close phase.(Overrides CommunicationObject.OnClose(TimeSpan).)

System_CAPS_protmethodOnClosed()

Invoked during the transition of a communication object into the closing state.(Inherited from CommunicationObject.)

System_CAPS_protmethodOnClosing()

Invoked during the transition of a communication object into the closing state.(Inherited from CommunicationObject.)

System_CAPS_protmethodOnEndClose(IAsyncResult)

Represents the end of the Close phase.(Overrides CommunicationObject.OnEndClose(IAsyncResult).)

System_CAPS_protmethodOnEndOpen(IAsyncResult)

Represents the end of the Open phase.(Overrides CommunicationObject.OnEndOpen(IAsyncResult).)

System_CAPS_protmethodOnFaulted()

Inserts processing on a communication object after it transitions to the faulted state due to the invocation of a synchronous fault operation.(Inherited from CommunicationObject.)

System_CAPS_protmethodOnOpen(TimeSpan)

Represents the Open phase.(Overrides CommunicationObject.OnOpen(TimeSpan).)

System_CAPS_protmethodOnOpened()

Invoked during the transition of a communication object into the opened state.(Inherited from CommunicationObject.)

System_CAPS_protmethodOnOpening()

Invoked during the transition of a communication object into the opening state.(Inherited from CommunicationObject.)

System_CAPS_pubmethodOpen()

Causes a communication object to transition from the created state into the opened state.(Inherited from CommunicationObject.)

System_CAPS_pubmethodOpen(TimeSpan)

Causes a communication object to transition from the created state into the opened state within a specified interval of time.(Inherited from CommunicationObject.)

System_CAPS_protmethodThrowIfDisposed()

Throws an exception if the communication object is disposed.(Inherited from CommunicationObject.)

System_CAPS_protmethodThrowIfDisposedOrImmutable()

Throws an exception if the communication object the State property is not set to the Created state.(Inherited from CommunicationObject.)

System_CAPS_protmethodThrowIfDisposedOrNotOpen()

Throws an exception if the communication object is not in the Opened state.(Inherited from CommunicationObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubeventClosed

Occurs when a communication object transitions into the closed state.(Inherited from CommunicationObject.)

System_CAPS_pubeventClosing

Occurs when a communication object transitions into the closing state.(Inherited from CommunicationObject.)

System_CAPS_pubeventFaulted

Occurs when a communication object transitions into the faulted state.(Inherited from CommunicationObject.)

System_CAPS_pubeventOpened

Occurs when a communication object transitions into the opened state.(Inherited from CommunicationObject.)

System_CAPS_pubeventOpening

Occurs when a communication object transitions into the opening state.(Inherited from CommunicationObject.)

The SqlPersistenceProviderFactory class represents a factory class for a fully-functional, durable service persistence provider. You can use this system-provided provider to persist and retrieve state information about a durable WCF service.

In addition to persistence, the provider created by the SqlPersistenceProviderFactory class implements locking of service state data records by inheriting from the abstract LockingPersistenceProvider class. Methods that interact with persisted data (such as Create or Update) have an optional parameter (lockInstance) that defines whether locks on the data in question are released or maintained.

System_CAPS_noteNote

PersistenceException exceptions thrown by SqlPersistenceProviderFactory do not have their exception details hidden by default. To protect against security vulnerabilities, these details can be hidden by setting IncludeExceptionDetailInFaults to false.

System_CAPS_noteNote

The SQL Persistence Provider stores and retrieves data from a SQL Server database. The host must create a secure SQL Server environment to protect against attackers gaining read/write access to the instance state either in the database or on the wire between the application and the database.

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: