R
RvGrah
My program is giving a strange exception at startup, only on client
machines. Runs fine on development machine. The app was upgraded long
ago from a 2003 version to a VS2005 version, but continued to run fine
until just a couple of weeks ago. Now new builds give the error when
the code hits:
SqlConnection cn = new SqlConnection();
The error is:
System.TypeInitializationException: The type initializer for
'System.Data.SqlClient.SqlConnection' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.Data.SqlClient.SqlConnectionFactory' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. --->
System.PlatformNotSupportedException: This operation is only supported
on Windows 2000 SP3 or later operating systems.
at
System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType
sidType, SecurityIdentifier domainSid)....
If the new connection was generated at the form's class level, it would
crash before even tring to load the form, it's only by moving the
constructor to the form's Load procedure that I could see this error
code explicitly. I've tried various things to make sure the references
are correct, and the code and references all seem similar to me to
other programs that run fine on the same clients.
Anybody have more info on this?
Bob Graham
machines. Runs fine on development machine. The app was upgraded long
ago from a 2003 version to a VS2005 version, but continued to run fine
until just a couple of weeks ago. Now new builds give the error when
the code hits:
SqlConnection cn = new SqlConnection();
The error is:
System.TypeInitializationException: The type initializer for
'System.Data.SqlClient.SqlConnection' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.Data.SqlClient.SqlConnectionFactory' threw an exception. --->
System.TypeInitializationException: The type initializer for
'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. --->
System.PlatformNotSupportedException: This operation is only supported
on Windows 2000 SP3 or later operating systems.
at
System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType
sidType, SecurityIdentifier domainSid)....
If the new connection was generated at the form's class level, it would
crash before even tring to load the form, it's only by moving the
constructor to the form's Load procedure that I could see this error
code explicitly. I've tried various things to make sure the references
are correct, and the code and references all seem similar to me to
other programs that run fine on the same clients.
Anybody have more info on this?
Bob Graham