locked
Custom serialization for SQL SessionState RRS feed

  • Question

  • User-1757191616 posted

    never mind on that. 

    seems my crashing issues were due to me trying to serialize data-bound entities.  working on fixing that.

    Friday, January 30, 2015 8:50 AM

Answers

  • 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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 1, 2015 9:38 PM