Creating the ASPState session database and assigning roles
This section explains how to create the ASPState session database, add a custom database name, and create a dB_executor role.
Note: Users should perform EITHER step one (1) or step two (2) but not both.
-
Create the ASPState database. Run this command inside an elevated PowerShell
window, with a user that has the necessary rights to the database:
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 .\aspnet_regsql.exe -ssadd -sstype p -C "data source=host;Integrated Security=true" -
Add a custom database name. The command below can be used to create a custom
named database. Run this command inside an elevated PowerShell window, with a
user that has the necessary rights to the database:
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319. \aspnet_regsql.exe -d ExpereASPState -ssadd -sstype c -C "data source=host;Integrated Security=true"Install the DocViewer application and transform to use the custom named database by adding the bolded values toC:\Program Files\WKFS\DocViewerInterfaceHtml\Configuration\sessionState.config:<sessionState sessionIDManagerType="WoltersKluwerFS.Osprey.DocViewerInterface.SessionIdManager, DocViewerInterfaceHtml" allowCustomSqlDatabase="true" mode="SQLServer" sqlConnectionString="data source=hostname;Initial Catalog=ExpereASPState;Integrated Security=true;" cookieless="false" timeout="60"/>Note: Users can modify thetransforms.xmlfile if they wish to maintain the dB name change between install and upgrade instances. Additionally, if using a custom database name, useDOCVIEWERINTERFACE_HTML_SQLSESSIONSTATEDBto update the settings file at time of installation. An example of a custom database value would belocalhost;Initial Catalog=ExpereASPState. -
Create custom database role as the application pool identity user requires the
db_datawriter,db_datareader, anddb_executorroles. Reference the following URL to create a customdb_executorrole and grant permission to the role: https://www.sqlmatters.com/Articles/Adding%20a%20db_executor%20role.aspx.CREATE ROLE db_executor GRANT EXECUTE TO db_executor
Note: Alternatively, you may assign thedb_ownerto the identity.