NetSqlAzManRoleProvider and Multi-thread exception

Mar 18, 2009 at 6:00 PM
Once in a while, we receive the following exception in our Web application using NetSqlAzManRoleProvider

Exception type: ArgumentException 
Exception message: The SqlParameter is already contained by another SqlParameterCollection. 

Stack trace: 
at System.Data.SqlClient.SqlParameterCollection.Validate(Int32 index, Object value)
   at System.Data.SqlClient.SqlParameterCollection.AddRange(Array values)
   at Tdo.Common.Entities.TdoEntityBase.SelectDataTable(String clauses, SqlDataAdapter& dataAdapter, SqlTransaction transaction, Boolean generateCommands, ITdoColumn[] fields)
   at Tdo.Common.Entities.TdoEntityBase.SelectDataTable(String clauses, ITdoColumn[] fields)
   at NetSqlAzMan.SqlAzManApplication.GetItems(ItemType itemType)
   at NetSqlAzMan.Providers.NetSqlAzManRoleProvider.GetRolesForUser(String username)
   at System.Web.Security.RolePrincipal.IsInRole(String role) ...

I confirmed that we are using the latest version of the Tdo.dll (v2.0.50727.32), which is the same as the one included in the v3.5 release of the NetSqlAzMan. From Forums on SourceForge, this is caused by multi-threading issues and according to the forum, should have been fixed since TDO v2.0.50727.30.

Can you take another look?

Thanks very much.
Mar 18, 2009 at 10:36 PM

I’m a little bit confused.

NetSqlAzMan 3.5 is NOT built with TDO but with LINQ.

Perhaps are you using an older NetSqlAzMan version (which ?)

However in the latest version ( this issue results fixed.



Mar 18, 2009 at 11:18 PM
Sorry, I was talking about v2.5.0.0.

Is it not being supported anymore? I cannot find the v2.5.0 download package on SourceForge or here, so I downloaded the latest TDO project from SourceForge and it still has the multi-thread problem.

Thanks for your help.
Mar 19, 2009 at 9:10 AM

Hi beeblebrox,

NetSqlAzMan is not more supported.

This is the link to the last NetSqlAzMan version for the .NET Framework 2.0:

Use the TDO version inside this package instead of downloading from TDO site.



Mar 19, 2009 at 3:51 PM
Thanks for your help!