Connection Error After Upgrade

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Cloud Applications
Shalex
Devart Team
Posts: 8080
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Post by Shalex » Fri 03 Mar 2017 11:42

We have implemented a temporary workaround: builder["SObjects"] with exclamation mark (!) now allows to define an object not to include in metadata.

Code: Select all

var builder = new SalesforceConnectionStringBuilder();
builder.UserId = "***";
builder.Password = "***";
builder.SecurityToken = "***";
builder["SObjects"] = "!ApiEvent";

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

wsimon
Posts: 9
Joined: Wed 08 Feb 2017 03:54

Re: Connection Error After Upgrade

Post by wsimon » Fri 03 Mar 2017 19:08

Shalex wrote:We have implemented a temporary workaround: builder["SObjects"] with exclamation mark (!) now allows to define an object not to include in metadata.

Code: Select all

var builder = new SalesforceConnectionStringBuilder();
builder.UserId = "***";
builder.Password = "***";
builder.SecurityToken = "***";
builder["SObjects"] = "!ApiEvent";

using (var conn = new SalesforceConnection(builder.ToString())) {
    conn.Open();
}
That seems to be working. Thanks!

MBray
Posts: 8
Joined: Tue 21 Jan 2014 15:43

Re: Connection Error After Upgrade

Post by MBray » Tue 03 Apr 2018 15:37

I have started getting the same error recently, but I am using Entity Framework. Error is this:

System.ServiceModel.CommunicationException:

{"Error in deserializing body of reply message for operation 'describeSObjects'."}

Inner Exception:

{"Instance validation error: 'tns:ChangeEventHeader' is not a valid value for soapType."}


The .NET code is simply this:

*************************************************************

private SFDCEntities SalesforceDataContext { get; set; }

...

this.SalesforceDataContext = new SFDCEntities(ConfigurationManager.ConnectionStrings["SFDCConnectionString"].ToString());
SalesforceDataContext.ContextOptions.LazyLoadingEnabled = false;

var opp = this.SalesforceDataContext.Opportunities.Where(it => it.Id.Equals("0060L00000kABVUQA4")).FirstOrDefault();

**************************************************************

Connection string is this:

"User Id=****************;Password=*************;Security Token=*****************;Host=login.salesforce.com;Deferred Login=False;System Objects=True";

MBray
Posts: 8
Joined: Tue 21 Jan 2014 15:43

Re: Connection Error After Upgrade

Post by MBray » Tue 03 Apr 2018 15:53

Also, current Devart Version is 3.2.348.0.

Shalex
Devart Team
Posts: 8080
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Post by Shalex » Fri 06 Apr 2018 15:25

Please try adding "SObjects=!ApiEvent;" to your connection string. Does this help?

MBray
Posts: 8
Joined: Tue 21 Jan 2014 15:43

Re: Connection Error After Upgrade

Post by MBray » Fri 04 May 2018 18:27

No, unfortunately, I am getting the same error. Exception details below:

System.ServiceModel.CommunicationException occurred
HResult=-2146233087
Message=Error in deserializing body of reply message for operation 'describeSObjects'.
Source=System.ServiceModel
StackTrace:
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
InnerException: System.InvalidOperationException
HResult=-2146233079
Message=There is an error in XML document (1, 93519).
Source=System.Xml
StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
InnerException: System.InvalidOperationException
HResult=-2146233079
Message=Instance validation error: 'tns:ChangeEventHeader' is not a valid value for soapType.
Source=Microsoft.GeneratedCode
StackTrace:
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read29_soapType(String s)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read31_Field(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read35_DescribeSObjectResult(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSoap.Read228_describeSObjectsResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer3.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
InnerException:

Shalex
Devart Team
Posts: 8080
Joined: Thu 14 Aug 2008 12:44

Re: Connection Error After Upgrade

Post by Shalex » Sat 05 May 2018 10:20

Could you try "SObjects=!CampaignChangeEvent,!ApiEvent;"?

If this doesn't help, contact us and specify your license number.

Post Reply