views:

280

answers:

1

What could be the possible causes for the following exception?

System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform.
   at System.EnterpriseServices.Platform.Assert(Boolean fSuccess, String function)
   at System.EnterpriseServices.Platform.Assert(Version platform, String function)
   at System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb)
   at System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl)
   at System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl)
   at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
   at System.Data.SqlClient.SqlConnection.Open()

The platform is Windows 2003 Server SP2. The same code has been tested on Windows XP SP2 without any problems. However, it would be interesting to know what reasons cause this exception regardless of the platform.

+1  A: 

I've poked at the sources using Reflector and I can't seem to find any call to Platform.Assert in the static constructor of ResourcePool.

Is the Windows 2003 server 64bit? That may be the problem.

Omer van Kloeten
You have to load System.EnterpriseServices in Reflector.The constructor of ResourcePool contains the following line: Platform.Assert(Platform.W2K, "ResourcePool");This does not answer the question, but at least we have the source of the exception.
csgero