Strange SqlConnection problem

G

Guest

Hi,

We've got a program thats been happily in production for the past few
months, but we'ev come accross a problem, for one users profile, we are
unable to create a SqlConnection object, getting the exceptions below related
to performance counters. The box is running XP SP1, and the user can run
other programs we made which use the SqlConnection object with EXACTLY the
same sql connection string. If we set the connection string to "" we still
get the same exception.

Its quite a puzzler.

Any light anyone could shead on this would be greatly appreachated, its
worth noting that other users who have the same basic profile, can run this
application fine, and that the user who has this problem, can run the program
fine on my development box (different build).

Thanks,

Steve Pirce

The exception trace:
{"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an
exception."}
{"The type initializer for 'System.Data.SqlClient.SqlConnectionFactory'
threw an exception."}
{"The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters'
threw an exception."}
{"This operation is only supported on Windows 2000 SP3 or later operating
systems."}

This operation is only supported on Windows 2000 SP3 or later operating
systems.
mscorlib
at System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType
sidType, SecurityIdentifier domainSid)\r\n at
System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String mutexName,
Mutex& mutex)\r\n at
System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName,
String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime
lifetime)\r\n at System.Diagnostics.SharedPerformanceCounter..ctor(String
catName, String counterName, String instanceName,
PerformanceCounterInstanceLifetime lifetime)\r\n at
System.Diagnostics.PerformanceCounter.Initialize()\r\n at
System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value)\r\n at
System.Data.ProviderBase.DbConnectionPoolCounters.Counter..ctor(String
categoryName, String instanceName, String counterName, PerformanceCounterType
counterType)\r\n at
System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName,
String categoryHelp)\r\n at
System.Data.SqlClient.SqlPerformanceCounters..ctor()\r\n at
System.Data.SqlClient.SqlPerformanceCounters..cctor()
{Void .ctor(System.Security.Principal.WellKnownSidType,
System.Security.Principal.SecurityIdentifier)}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top