Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
SQL_ME_RICH
SQL_ME_RICH
Mr or Mrs. 500
Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)

Group: General Forum Members
Points: 526 Visits: 1588
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
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (6.8K reputation)

Group: Moderators
Points: 6828 Visits: 1917
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
SQL_ME_RICH
SQL_ME_RICH
Mr or Mrs. 500
Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)

Group: General Forum Members
Points: 526 Visits: 1588
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.
mohsinashfaqh
mohsinashfaqh
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 49
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 :-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search