Connection Pooling issues with Integrated Authentication

Thread is closed for posting
2 posts, 0 answers
  1. SteveT
    SteveT avatar
    3 posts
    Member since:
    Dec 2013

    Posted 31 Mar 2014 Link to this post


    We are using OpenAccess to connect to a SQL database uwing Windows Authentication instead of SQL Authentication. We therefore have Windows Integrated Authentication enabled on the IIS webapplication and are using a connectionstring similar to the following:-

    <add name="MyConnection" connectionString="Data;Initial Catalog=MyDatabaseName;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False" />

    We are also using the default Connection Pool of "Use OpenAccess Connection Pool" as part of the OpenAccess Backend Configuration. Whilst this seemed fine during initial development and testing, we began to have issues when having several users test the system at the same time. Essentially user contexts appear to be getting re-used resulting in people storing records using other peoples credentials (the wrong SUSER_SNAME at the SQL server). We have tested this on several of our webapplications/databases and see the same results. We have also ensured that all of the OpenAccess calls are embedded within "using" blocks to ensure that resources are freed correctly.

    We then tried the "Use OpenAccess Connection Pool with OpenAccess Connection Management" settings. That seems to have resolved the issue with re-using user contexts.

    So, my question is: What type of connection pooling should we use with Integrated Authentication and is it expected that the default pooling will re-use user contexts? We could not find documentation to explain the difference between the connnection types.

    On a different, but possibly related, issue; whilst attempting to debug this situation we enabled logging on OpenAccess and noticed that our IIS servers are logging hundreds of errors like the following. This repeats even when there is no-one access the system. We have searched extensively for solutions to this but cannot find any useful informatation. This does not happen on our development PCs. We have tested on 2 different sets of IIS and SQL servers and see the same errors.

    17:59:28.975 driver.con.connect          390 MultipleActiveResultSets=true;Data;Initial Catalog=MyDatabaseName;Integrated Security=True; Trusted_Connection=Yes
    17:59:28.975 driver.pool.error           Exception in connection pool cleanup thread.

    FYI : We are using OpenAccess 2013.3.1014

  2. Ralph Waldenmaier
    Ralph Waldenmaier avatar
    202 posts

    Posted 01 Apr 2014 Link to this post

    Hi Steve,
    I think you have posted your question twice by mistake.
    Your question is answered in your other thread. I will therefore close this one.

    Ralph Waldenmaier
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top