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

  • 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

  • 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
    @kbriankelley

  • 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.

  • 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 🙂

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply