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.
精彩评论