Connection Error After Upgrade

Connection Error After Upgrade

Postby wsimon » Wed 08 Feb 2017 04:04

After attempting to upgrade dotConnect for Salesforce to 3.1.200.0 (from 2.4.678.0), I am getting an error any time a connection is trying to open:

The exception is:
Code: Select all
    "exceptionMessage": "The underlying provider failed on Open.",
    "exceptionType": "System.Data.Entity.Core.EntityException",


With an inner exception of:
Code: Select all
"innerException": {
      "message": "An error has occurred.",
      "exceptionMessage": "Error in deserializing body of reply message for operation 'describeSObjects'.",
      "exceptionType": "System.ServiceModel.CommunicationException",
      "stackTrace": "\r\nServer stack trace: \r\n   at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)\r\n   at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)\r\n   at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)\r\n   at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters)\r\n   at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc)\r\n   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)\r\n   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n   at Devart.Data.Salesforce.j.a(HeaderOptions A_0)\r\n   at Devart.Data.Salesforce.ao.a(k A_0, Object A_1, DbConnectionBase A_2)\r\n   at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, k A_1, DbConnectionBase A_2)\r\n   at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)\r\n   at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)\r\n   at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)\r\n   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)\r\n   at Devart.Common.DbConnectionBase.Open()\r\n   at Devart.Data.Salesforce.SalesforceConnection.Open()\r\n   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)\r\n   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)\r\n   at System.Data.Entity.Core.EntityClient.EntityConnection.Open()",
      "innerException": {
        "message": "An error has occurred.",
        "exceptionMessage": "There is an error in XML document (13, 515524).",
        "exceptionType": "System.InvalidOperationException",
        "stackTrace": "   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)\r\n   at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)",
        "innerException": {
          "message": "An error has occurred.",
          "exceptionMessage": "Instance validation error: 'tns:json' is not a valid value for soapType.",
          "exceptionType": "System.InvalidOperationException",
          "stackTrace": "   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read27_soapType(String s)\r\n   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read29_Field(Boolean isNullable, Boolean checkType)\r\n   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read33_DescribeSObjectResult(Boolean isNullable, Boolean checkType)\r\n   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read447_describeSObjectsResponse()\r\n   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer230.Deserialize(XmlSerializationReader reader)\r\n   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)"
        }
      }
    }


Any Ideas?
Thanks!
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Fri 10 Feb 2017 12:11

We cannot reproduce the issue at the moment. Please try to open an ADO.NET connection. Does it work? If not, is the error the same?
Code: Select all
    using (var conn = new SalesforceConnection()) {
        conn.UserId = "***";
        conn.Password = "***";
        conn.SecurityToken = "***";
        conn.Open();
    }
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Fri 10 Feb 2017 17:25

Yes same error. I also get the same error when trying to connect from the entity developer - it pops up a message when trying to connect that says "Error in deserializing body of reply message for operation 'describeSObjects'."
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Tue 14 Feb 2017 10:56

1. Please open an ADO.NET connection (like described in our previous reply) in a separate simple Console Application with a default app.config. If the connection is opened successfully in a console application, specify the <bindings> section in *.config of your application which stopped working after upgrade.

2. Did you change anything (e.g.: target .NET Framework) in addition to provider upgrade?
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Tue 14 Feb 2017 18:10

Shalex wrote:1. Please open an ADO.NET connection (like described in our previous reply) in a separate simple Console Application with a default app.config. If the connection is opened successfully in a console application, specify the <bindings> section in *.config of your application which stopped working after upgrade.

2. Did you change anything (e.g.: target .NET Framework) in addition to provider upgrade?


1. I created a simple console application, added references to the Devart.Data dll and Devart.Data.Salesforce dll and put in the ADO.NET connection code and received the same error on conn.Open(). I even opened up the sample project in C:\Program Files (x86)\Devart\dotConnect\Salesforce\Samples\Console\cs and replaced the credentials with our Salesforce environment credentials and ran it and I received the same error. I did this on two different machines with dotconnect for Salesforce v 3.1.200.0 installed and received the same error on both machines.

2. Nothing else changed in our project besides the upgrade to dotconnect for Salesforce. If I revert the upgrade, things start working again.
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Wed 15 Feb 2017 12:45

Please do the following:

1. Remove the local cache files C:\Users\{user name}\AppData\Roaming\*.db. Provider will recreate them on the next conn.Open().

2. Run this test code. Does it work?
Code: Select all
    var builder = new SalesforceConnectionStringBuilder();
    builder.UserId = "***";
    builder.Password = "***";
    builder.SecurityToken = "***";
    builder["SObjects"] = "Account";

    using (var conn = new SalesforceConnection(builder.ToString())) {
        conn.Open();
    }
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Wed 15 Feb 2017 17:02

Shalex wrote:Please do the following:

1. Remove the local cache files C:\Users\{user name}\AppData\Roaming\*.db. Provider will recreate them on the next conn.Open().

2. Run this test code. Does it work?
Code: Select all
    var builder = new SalesforceConnectionStringBuilder();
    builder.UserId = "***";
    builder.Password = "***";
    builder.SecurityToken = "***";
    builder["SObjects"] = "Account";

    using (var conn = new SalesforceConnection(builder.ToString())) {
        conn.Open();
    }


Yes that did work. Any idea as to what is causing the problem when the SObjects are not explicitly set to just Account?
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Thu 16 Feb 2017 18:23

We have just sent a build with the fix to your email. Please try it and notify us about the result.
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Thu 16 Feb 2017 23:18

Shalex wrote:We have just sent a build with the fix to your email. Please try it and notify us about the result.


I'm getting the same error with that build.
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Mon 20 Feb 2017 14:55

We have just sent an updated test build to your email. Please try it and notify us about the result.
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Mon 20 Feb 2017 17:19

I'm seeing the same error with the updated build.
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Tue 21 Feb 2017 17:56

We have asked for the additional information by email.
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Fri 24 Feb 2017 16:58

I replied by email 3 days ago but haven't heard any response. Please let me know what I can do to help debug this issue further.
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Postby Shalex » Mon 27 Feb 2017 20:45

We have answered to you by email.
Shalex
Devart Team
 
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Postby wsimon » Thu 02 Mar 2017 16:31

It's again been a few days since I have heard from you by email. Please let me know the status and if I can help try another fix.
wsimon
 
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Next

Return to dotConnect for Cloud Applications