How to update the session mode from the other modes to InProc at the replicate Identify instance
Introduction
Given that you have an Identify instance T1 which is deployed on both webserver Web01 and webserver Web02 and its current session mode is SQLServer state, you need to do the following steps to apply the InProc.
Solution
Web config update
As default, the default directory for the tenants is at: "C:\Program Files\Safewhere\Identify\Tenants" (If you customize this, please replace this by your custom directory).
In webserver Web01, do following steps:
Step 1: open the CMD prompt from the Start\Run.
Step 2: execute the commandline
CD C:\Windows\Microsoft.NET\Framework\v4.0.30319
Step 3: execute the commandline
aspnet_regiis.exe -pdf "system.web/sessionState" "C:\Program Files\Safewhere\Identify\Tenants\#yourTenantT1\admin"
Note: you need to replace #yourTenantT1 by your own tenant.
Step 4: access the web.config in the directory: "C:\Program Files\Safewhere\Identify\Tenants#yourTenantT1\admin", and update its sessionState section to:
<sessionState mode="InProc" cookieName="Identify_SessionId"... />
Step 5: access the web.config in the directory: "C:\Program Files\Safewhere\Identify\Tenants#yourTenantT1\runtime", and update its sessionState section to:
<sessionState mode="InProc" cookieName="Identify_SessionId"... />
Step 6: open IIS and reset the application pool of the Identify instance T1.
Step 7: access Identify Admin of T1 directly on the webserver Web01 to ensure login works well.
Repeat the above steps for the Identify instance T1 in the webserver Web02.
Database update
After verifying accessibility of the Identify instance T1 on both servers successfully, you should update the sessionStateMode setting of Identify instance T1's XmlConfiguration value to InProc so that it will be used when you upgrade your Identify instance next time. The steps are:
Step 1: access the IdentifyTenant database, select [XmlConfiguration] of the Identify instance T1 using the SQL script below (Note: you need to replace #TenantT1 by your own tenant name)
SELECT [Id]
,[TenantId]
,[Name]
,[Version]
,[XmlConfiguration]
,[ConfiguratorId]
FROM [dbo].[Tenant]
WHERE [Name]= N'#TenantT1'
GO
Here is a sample of the collected XmlConfiguration:
<configuration>
<tenant name="identifycen54v12a" serverCount="0" sessionStateMode="SQLServer" timeout="60" sqlStateServerConnectionString="[some connection string goes here]" processIdentity="WIN2K12R2SUB\sqluser1" isDeployedSafewhereAdmin="true" deployedSafewhereAdminVersion="5.4.0.13" deployedSafewhereAdminClientId="SafewhereAdmin_modstclient8f0722a3-7d07-4995-a713-a3c6fecbbf9a" deployedSafewhereAdminClientSecret="SafewhereAdmin_modstclienta98468d4-f896-4fa8-bd35-aa82e46cde9d">
...
</tenant>
</configuration>
Step 2: update the sessionStateMode from SQLServer to InProc as well as sqlStateServerConnectionString to empty (Note: you need to replace #TenantT1 by your own tenant name as well as use the collected XmlConfiguration above)
UPDATE [dbo].[Tenant]
SET [XmlConfiguration] = N'<configuration>
<tenant name="identifycen54v12a" serverCount="0" sessionStateMode="InProc" timeout="60" sqlStateServerConnectionString="" processIdentity="WIN2K12R2SUB\sqluser1" isDeployedSafewhereAdmin="true" deployedSafewhereAdminVersion="5.4.0.13" deployedSafewhereAdminClientId="SafewhereAdmin_modstclient8f0722a3-7d07-4995-a713-a3c6fecbbf9a" deployedSafewhereAdminClientSecret="SafewhereAdmin_modstclienta98468d4-f896-4fa8-bd35-aa82e46cde9d">
...
</tenant>
</configuration>'
WHERE [Name]= N'#TenantT1'