I hate to be so vague while trying to characterize something, but I can
only describe what we have seen so far. We have a typical n-tier system
that is comprised of the usual ASP.NET, BF, Biz, Data Access and DB
layers. The Biz layer code uses serviced .NET components. The Data Access
Layer components use Microsoft's SqlHelper helper class to execute various
operations on the DB using stored procedures.

We also have a managed Windows service that occasionally wakes up and
performs certain opertations using the Biz Layer components. The Windows
service code path is traversed thousands of times w/o any problems, but
occasionally, we see an error that looks something like this:

<paste>
Exception Type: System.ArgumentException
Message: The SqlParameter with ParameterName '@XXXXX' is already contained
by another SqlParameterCollection.
ParamName: NULL
TargetSite: Void Validate(Int32, System.Data.SqlClient.SqlParameter)
HelpLink: NULL
Source: System.Data
</paste>

We have pored over the code several times and have concluded that the most
likely explanation is a bug in the SqlParameter's caching of SP
parameters. We are certain that reentrancy is not an issue in this case.

Has anyone else run into this problem before? Note that there's no
reliable known method of reproducing this problem. It seemingly happens at
random and once we run into this situation, the only recourse seems to be
to restart the service.

Atul

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to