简体   繁体   中英

Trusted_Connection vs Integrated Security affects connection pooling

I was running some application performance monitoring on my ASP.NET 4.0 application (on Windows 2008 RC2, connected to a SQL Server 2005 database) and noticed that the connections did not appear to be pooling. We run the application pool under a specific user and use integrated security. With a connection string like:

<add name="myConnection" connectionString="Server=DBSrv;Database=DB1;Trusted_Connection=true;" providerName="System.Data.SqlClient"/>

On a hunch i slightly modified the connection string to use the Integrated Security syntax instead of trusted_connection. After making the change the connections began using the connection pool.

<add name="myConnection" connectionString="Server=DBSrv;Database=DB1;Persist Security Info=False;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>

I can't find any documentation anywhere that suggests that these formats would affect pooling. Has anyone come across something similiar?

The tool I was using (dynatrace), that was reporting that the connection pooling was behaving differently based on the connectionstring format appears to be the culprit. A more recent upgrade of dynatrace no longer showed a difference. Apparently this was a phantom issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM