User2008642861 posted
Hi Fullmetal691,
Thank you for your post. I think, you could refer to the code as below.
<configuration>
<connectionStrings>
<add name="OdbcSessionServices"
connectionString="DSN=SessionState;" />
</connectionStrings>
<system.web>
<sessionState
mode="Custom"
customProvider="OdbcSessionProvider">
<providers>
<add name="OdbcSessionProvider"
type="Samples.AspNet.Session.OdbcSessionStateStore"
connectionStringName="OdbcSessionServices"
writeExceptionsToEventLog="false" />
</providers>
</sessionState>
</system.web>
</configuration>
For more information, please refer to the below link.
https://msdn.microsoft.com/en-us/library/ms178586(v=vs.140).aspx
Hope this could be helpful to you.
Best regards,
Archer