This is a migrated thread and some comments may be shown as answers.

Connection Pooling issues with Integrated Authentication

1 Answer 53 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
SteveT
Top achievements
Rank 2
SteveT asked on 31 Mar 2014, 09:14 AM
Hi,

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 Source=XXX.myDomain.com;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 Source=XXX.myDomain.com;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

Regards,
Steve.

1 Answer, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 01 Apr 2014, 08:12 AM
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.

Regards,
Ralph Waldenmaier
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Development (API, general questions)
Asked by
SteveT
Top achievements
Rank 2
Answers by
Ralph Waldenmaier
Telerik team
Share this question
or