MsSQL CRM: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception.

Status
Not open for further replies.

buxit

Forum User
Joined
Mar 23, 2020
Messages
2
Reaction score
0
CRM Integration Test from 3cx linux host to MS SQL Server gives me the following error. A call flow using the same SQL server works fine. Any ideas?


System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
--- End of inner exception stack trace ---
at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location where exception was thrown ---
at CrmIntegration.SqlDatabaseClient.Execute(String statement, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessSQLDatabaseQuery(ISQLClientFactory sqlClientFactory, ScenarioQuery query, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(String contactNumber, String destinationEmail, Boolean createIfNotFound, CancellationToken token)
 
hello @buxit,

This is a known issue. Please open a support ticket and the engineers will guide you through.
 
hello @buxit,

This is a known issue. Please open a support ticket and the engineers will guide you through.
I have the exact same issue and after trying everything I know of I came across this message but, when I tried to put in a ticket for the support it says I have to purchase and it won't let me. I have an Enterprise 3CX anything before as someone else had or I could find an answer but this problem is so frustrating I have finally shown up here for assistance.

What can I do to resolve this "known" issue if I am not able to put in a support ticket and the resolution is not posted somewhere to find?
 
hi @stubss411,

i'm not fully in the loop as i didn't watch the teamviewer session. as far as i know they only installed an updated 3cx deb (16.0.4.508). 3cx support could just have posted the link and told us what to do. i don't know why they forced us to buy a support ticket.
 
hi @stubss411,

i'm not fully in the loop as i didn't watch the teamviewer session. as far as i know they only installed an updated 3cx deb (16.0.4.508). 3cx support could just have posted the link and told us what to do. i don't know why they forced us to buy a support ticket.
Thank you for your reply and for being so quick as well. I would gladly buy a Support Ticket if I don't get it to work after that but the web portal just hangs and won't let me purchase it just rotates like an old MAC OS Rainbow Wheel of Fortune
 
hi @stubss411,

i'm not fully in the loop as i didn't watch the teamviewer session. as far as i know they only installed an updated 3cx deb (16.0.4.508). 3cx support could just have posted the link and told us what to do. i don't know why they forced us to buy a support ticket.
I just realized it's because that version 16.0.4.508 is not for public release that's why. If there was a download available I'd have that installed on my test setup and then move on if it works.Thanks again!
 
opppssss
only now I realized that the connection at CRM is down .....
i have:
3cx (windows) version 16.0.504
crm -> sql server 2014 (12.0.6024) on windows 2012

help
thanks

Giulio
 
i have investigate ....
i found this:
in C:\Program Files\3CX Phone System\Bin
System.Text.Encoding.CodePages.dll version 4.6.24705.01
System.Text.Encoding.dll version 4.6.27617.02
System.Text.Encoding.Extensions.dll version 4.6.27617.02
System.Text.Encodings.Web.dll version 4.6.26515.06
System.Text.RegularExpressions version 4.627617.02

mmmmm.....
here is the problem ?

Giulio
 
Last edited:
Same problem here. I think we have to wait for the fix....
 
update your debian 9:
from console linux
execute this commands:
- apt-get update
- apt-get dist-upgrade

now work !!
3cx version 16.0.507

Giulio


CRM Integration Test from 3cx linux host to MS SQL Server gives me the following error. A call flow using the same SQL server works fine. Any ideas?


System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
--- End of inner exception stack trace ---
at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location where exception was thrown ---
at CrmIntegration.SqlDatabaseClient.Execute(String statement, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessSQLDatabaseQuery(ISQLClientFactory sqlClientFactory, ScenarioQuery query, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(String contactNumber, String destinationEmail, Boolean createIfNotFound, CancellationToken token)
 
[...]

now work !!
3cx version 16.0.507
You probably meant 16.0.4.507. But that release is not the release that everyone else of us has. The latest release from 3CX is 16.0.4.504.

How did you get to 507?
 
The Beta for Windows resolves my issue. I had a few others but the CRM issue is resolved for MSSQL on Windows 3CX 16.0.5.454 just thought I'd update.
 
I have installed the update and its working now.
 
I received an interim update from support and installed it. since then it is working
 
I received an interim update from support and installed it. since then it is working
Which interim update did you get? I couldn't reach support or buy a support ticket so I was left with Beta updates or wait and I, unfortunately, did not have the time to wait anymore. Is this something I can backdate down to as well or will that cause more issues?

Yes, I backup everything before I update. Thanks for the reply FYI!
 
16.0.4.508
 
Hello @stubss411 ,

If you updated your PBX to the Update 5 BETA (16.0.5.553) release then you will get the fix on MsSQL CRM Integration.
 
@stubss411 Can you confirm if you updated and it was corrected?
 
@stubss411 Can you confirm if you updated and it was corrected?
The Beta for Windows resolves my issue. I had a few others but the CRM issue is resolved for MSSQL on Windows 3CX 16.0.5.454 just thought I'd update.
I had replied so that people knew the Beta resolved the CRM issue. I don't like being on Beta though and I did not have another easy way to resolve it other than the beta as my other options to reach out to customer support at 3cx paid or not would not work and it was a time crunch. Now I will need to wait until the beta is stable and re-install it and hope it goes well instead of being able to install 16.0.4.508
 
Hi all
We had the same issue.
To Buy a support ticket for such a issue, is really not customer friendly - to use nice words!
... It leads you, to change to another Pbx!

Since yesterday we got the version 16.0.5.611 available - i hope this issue is solved with this version.
Any positive feedbacks?
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,990
Messages
590,161
Members
164,926
Latest member
tohoken1