Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error logging in...The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception Expand / Collapse
Author
Message
Posted Monday, October 1, 2012 3:43 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, July 11, 2014 4:23 PM
Points: 471, Visits: 1,308
Hello - I have a SQL Server instance that I am only able to get to from my local installation of SQL 2005, but from any other method I attempt to access the instance (i.e. RDP session over to the server, APEX SQL, etc...) I am getting the following error. Here is the main error message, and a snapshot of the error scrren.

The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception



It's not an incorrect password or user ID as I am able to get logged in just fine through the SQL Server Authentication in my local copy of the instance, but from any other means - this is what I get.

Any advice or help would be appreciated. I have check the Server Configuration (all but VIA protocols are enabled for the instance) as well as the Surface Area Configuration (which shows to use both TCP/IP and Named Pipes for both local and remote connections to the box).

Thank you,

SQL_ME_RICH
Post #1366799
Posted Wednesday, October 3, 2012 6:37 AM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Thursday, July 10, 2014 1:34 PM
Points: 6,623, Visits: 1,855
Is it just your system? Can others log on to the server just fine?

The reason I ask is that's a Microsoft.NET Framework error that's being thrown. There looks to be an issue with your machine.config file at the location listed. I'm not sure if that error is on your local system or on the server, but I would guess that would be on your local system.


K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #1367627
Posted Wednesday, October 3, 2012 6:55 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, July 11, 2014 4:23 PM
Points: 471, Visits: 1,308
Hi Brian - no - unfortunately others are getting this too, and it is happening on the server itself (we RDP over to it and try to open SSMS up and this is what we all are getting).

OK - so do I just need to go in and run the command to reinitialize the .NET framework from the version of the framework in question? I think the command is 'ASPNET_REGIIS -R' or something like that.
Post #1368127
Posted Thursday, April 4, 2013 5:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 2, 2014 5:41 AM
Points: 5, Visits: 47
I have also been facing this issue since a couple of days. I uninstalled and reinstalled the sql server completely. Didnt work for me.

Finally realized that its a quick fix. Just repaired dot net framework that was installed on my machine and its working like a gem now
Post #1438732
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse