245 lines
13 KiB
XML
245 lines
13 KiB
XML
<?xml version="1.0"?>
|
|
<doc>
|
|
<assembly>
|
|
<name>AWS.Extensions</name>
|
|
</assembly>
|
|
<members>
|
|
<member name="T:Amazon.SessionProvider.DynamoDBSessionStateStore">
|
|
<summary>
|
|
DynamoDBSessionStateStore is a custom session state provider that can be used inside of an ASP.NET application. Session state is saved
|
|
inside a DynamoDB table that can be configured in the web.config. If the table does not exist the provider will create
|
|
it during initialization with default read and write units set to 10 and 5 unless configured otherwise. If the table is created
|
|
the application startup will block for about a minute while the table is being created.
|
|
|
|
Example web.config entry setting up the session state provider.
|
|
<code>
|
|
<sessionState
|
|
mode="Custom"
|
|
customProvider="DynamoDBSessionStoreProvider"gt;
|
|
<providers>
|
|
<add name="DynamoDBSessionStoreProvider"
|
|
type="Amazon.SessionProvider.DynamoDBSessionStateStore"
|
|
AWSAccessKey="YOUR_ACCESS_KEY"
|
|
AWSSecretKey="YOUR_SECRET_KEY"
|
|
Region="us-east-1"
|
|
Table="ASP.NET_SessionState"
|
|
/>
|
|
</providers>
|
|
</sessionState>
|
|
</code>
|
|
|
|
<para>
|
|
The schema for the table used to store session requires a string hash key with no range key. The provider will look up the name of the hash key during
|
|
initialization so any name can be given for the hash key.
|
|
</para>
|
|
|
|
<para>
|
|
Below is a list of configuration attributes that can specified in the provider element in the web.config.
|
|
<list type="table">
|
|
<listheader>
|
|
<term>Config Constant</term>
|
|
<term>Use</term>
|
|
</listheader>
|
|
<item>
|
|
<term>AWSAccessKey</term>
|
|
<description>Access key used. This can be set at either the provider or in the appSettings.</description>
|
|
</item>
|
|
<item>
|
|
<term>AWSSecretKey</term>
|
|
<description>Secret key used. This can be set at either the provider or in the appSettings.</description>
|
|
</item>
|
|
<item>
|
|
<term>Region</term>
|
|
<description>Required string attribute. The region to use DynamoDB in. The default is us-east-1. Possible values are us-east-1, us-west-1, us-west-2, eu-west-1, ap-northeast-1, ap-southeast-1.</description>
|
|
</item>
|
|
<item>
|
|
<term>Application</term>
|
|
<description>Optional string attribute. Application is used to partition the session data in the table so it can be used for more then one application.</description>
|
|
</item>
|
|
<item>
|
|
<term>Table</term>
|
|
<description>Optional string attribute. The table used to store session data. The default is ASP.NET_SessionState.</description>
|
|
</item>
|
|
<item>
|
|
<term>ReadCapacityUnits</term>
|
|
<description>Optional int attribute. The read capacity units if the table is created. The default is 10.</description>
|
|
</item>
|
|
<item>
|
|
<term>WriteCapacityUnits</term>
|
|
<description>Optional int attribute. The write capacity units if the table is created. The default is 5.</description>
|
|
</item>
|
|
<item>
|
|
<term>CreateIfNotExist</term>
|
|
<description>Optional boolean attribute. CreateIfNotExist controls whether the table will be auto created if it doesn't exist. Default is true.</description>
|
|
</item>
|
|
</list>
|
|
</para>
|
|
</summary>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.#ctor">
|
|
<summary>
|
|
Default Constructor
|
|
</summary>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.#ctor(Amazon.DynamoDB.AmazonDynamoDB)">
|
|
<summary>
|
|
Constructor for testing.
|
|
</summary>
|
|
<param name="ddbClient"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.Initialize(System.String,System.Collections.Specialized.NameValueCollection)">
|
|
<summary>
|
|
Initializes the provider by pulling the config info from the web.config and validate/create the DynamoDB table.
|
|
If the table is being created this method will block until the table is active.
|
|
</summary>
|
|
<param name="name"></param>
|
|
<param name="config"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.SetItemExpireCallback(System.Web.SessionState.SessionStateItemExpireCallback)">
|
|
<summary>
|
|
Provider returns false for this method.
|
|
</summary>
|
|
<param name="expireCallback"></param>
|
|
<returns></returns>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.GetItem(System.Web.HttpContext,System.String,System.Boolean@,System.TimeSpan@,System.Object@,System.Web.SessionState.SessionStateActions@)">
|
|
<summary>
|
|
Returns read-only session-state data from the DynamoDB table.
|
|
</summary>
|
|
<param name="context"></param>
|
|
<param name="sessionId"></param>
|
|
<param name="locked"></param>
|
|
<param name="lockAge"></param>
|
|
<param name="lockId"></param>
|
|
<param name="actionFlags"></param>
|
|
<returns></returns>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.GetItemExclusive(System.Web.HttpContext,System.String,System.Boolean@,System.TimeSpan@,System.Object@,System.Web.SessionState.SessionStateActions@)">
|
|
<summary>
|
|
Returns session-state data from the DynamoDB table.
|
|
</summary>
|
|
<param name="context"></param>
|
|
<param name="sessionId"></param>
|
|
<param name="locked"></param>
|
|
<param name="lockAge"></param>
|
|
<param name="lockId"></param>
|
|
<param name="actionFlags"></param>
|
|
<returns></returns>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.GetSessionStoreItem(System.Boolean,System.Web.HttpContext,System.String,System.Boolean@,System.TimeSpan@,System.Object@,System.Web.SessionState.SessionStateActions@)">
|
|
<summary>
|
|
Get the session for DynamoDB and optionally lock the record.
|
|
</summary>
|
|
<param name="lockRecord"></param>
|
|
<param name="context"></param>
|
|
<param name="sessionId"></param>
|
|
<param name="locked"></param>
|
|
<param name="lockAge"></param>
|
|
<param name="lockId"></param>
|
|
<param name="actionFlags"></param>
|
|
<returns></returns>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.SetAndReleaseItemExclusive(System.Web.HttpContext,System.String,System.Web.SessionState.SessionStateStoreData,System.Object,System.Boolean)">
|
|
<summary>
|
|
Updates the session-item information in the session-state data store with values from the current request, and clears the lock on the data.
|
|
</summary>
|
|
<param name="context">The HttpContext for the current request.</param>
|
|
<param name="sessionId">The session identifier for the current request.</param>
|
|
<param name="item">The SessionStateStoreData object that contains the current session values to be stored.</param>
|
|
<param name="lockId">The lock identifier for the current request. </param>
|
|
<param name="newItem">true to identify the session item as a new item; false to identify the session item as an existing item.</param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.ReleaseItemExclusive(System.Web.HttpContext,System.String,System.Object)">
|
|
<summary>
|
|
Releases a lock on an item in the session data store.
|
|
</summary>
|
|
<param name="context">The HttpContext for the current request.</param>
|
|
<param name="sessionId">The session identifier for the current request.</param>
|
|
<param name="lockId">The lock identifier for the current request. </param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.RemoveItem(System.Web.HttpContext,System.String,System.Object,System.Web.SessionState.SessionStateStoreData)">
|
|
<summary>
|
|
Removes the session record for DynamoDB.
|
|
</summary>
|
|
<param name="context"></param>
|
|
<param name="sessionId"></param>
|
|
<param name="lockId"></param>
|
|
<param name="item"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.CreateUninitializedItem(System.Web.HttpContext,System.String,System.Int32)">
|
|
<summary>
|
|
Creates an initial session record in the DynamoDB table.
|
|
</summary>
|
|
<param name="context"></param>
|
|
<param name="sessionId"></param>
|
|
<param name="timeout"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.CreateNewStoreData(System.Web.HttpContext,System.Int32)">
|
|
<summary>
|
|
Creates a new SessionStateStoreData object to be used for the current request.
|
|
</summary>
|
|
<param name="context"></param>
|
|
<param name="timeout"></param>
|
|
<returns></returns>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.ResetItemTimeout(System.Web.HttpContext,System.String)">
|
|
<summary>
|
|
Updates the expiration date and time of an item in the DynamoDB table.
|
|
</summary>
|
|
<param name="context"></param>
|
|
<param name="sessionId"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.DeleteExpiredSessions(Amazon.DynamoDB.AmazonDynamoDB)">
|
|
<summary>
|
|
A utility method for cleaning up expired sessions that IIS failed to delete. The method performs a scan on the ASP.NET_SessionState table
|
|
with a condition that the expiration date is in the past and calls delete on all the keys returned. Scans can be costly on performance
|
|
so use this method sparingly like a nightly or weekly clean job.
|
|
</summary>
|
|
<param name="dbClient">The AmazonDynamoDB client used to find a delete expired sessions.</param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.DeleteExpiredSessions(Amazon.DynamoDB.AmazonDynamoDB,System.String)">
|
|
<summary>
|
|
A utility method for cleaning up expired sessions that IIS failed to delete. The method performs a scan on the table
|
|
with a condition that the expiration date is in the past and calls delete on all the keys returned. Scans can be costly on performance
|
|
so use this method sparingly like a nightly or weekly clean job.
|
|
</summary>
|
|
<param name="dbClient">The AmazonDynamoDB client used to find a delete expired sessions.</param>
|
|
<param name="tableName">The table to search.</param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.Dispose">
|
|
<summary>
|
|
Empty implementation of the override.
|
|
</summary>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.InitializeRequest(System.Web.HttpContext)">
|
|
<summary>
|
|
Empty implementation of the override.
|
|
</summary>
|
|
<param name="context"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.EndRequest(System.Web.HttpContext)">
|
|
<summary>
|
|
Empty implementation of the override.
|
|
</summary>
|
|
<param name="context"></param>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.ValidateTable">
|
|
<summary>
|
|
Make sure existing table is valid to be used as a session store.
|
|
</summary>
|
|
</member>
|
|
<member name="M:Amazon.SessionProvider.DynamoDBSessionStateStore.GetHashKey(System.String)">
|
|
<summary>
|
|
Combine application and session id for hash key.
|
|
</summary>
|
|
<param name="sessionId"></param>
|
|
<returns></returns>
|
|
</member>
|
|
<member name="P:Amazon.SessionProvider.DynamoDBSessionStateStore.TableName">
|
|
<summary>
|
|
Gets the name of the table used to store session data.
|
|
</summary>
|
|
</member>
|
|
</members>
|
|
</doc>
|