Sign Up for Training |
insightsoftware Company Site
Community
Downloads
Training
Submit a Request
Become a Jet Insider
Give Feedback

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


Issue

When user a 'Dynamics NAV 2013 and later (SQL Server)' data source in the Jet Excel Add-In, a non-admin user can receive the following error:

error_msg.png

Complete text of error message is:

An unexpected error has occurred: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.

Cause

Non-admin user accounts need to be assigned to the "Impersonate a client after authentication" security policy role to allow the Jet Excel Add-In to access data directly from a SQL database.

Resolution

Here are the steps that a LOCAL ADMINISTRATOR will need to follow to add the non-admin user to this role:

  1. From the Windows Start menu, search for Administrative Tools and click the Control Panel app
    admin_tools.png
  2. Double-click Local Security Policy
    lsp.png
  3. Expand Local Policies, and then click User Rights Assignment
    user_rights2.jpg
  4. In the right pane, double-click Impersonate a client after authentication
    impersonate.jpg
  5. In the Local Security Policy Setting dialog box, click Add User or Group
    imper_prop.jpg
  6. In the Select Users or Group dialog box, find the user account that you want to add, then click OK
    select_users.jpg
  7. Click OK on the Local Security Policy Setting dialog box
  8. Reboot the system and try the steps to reproduce the problem

 

 
 
Was this article helpful?
0 out of 0 found this helpful

Comments