Connection Error After Upgrade

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Cloud Applications
Shalex
Devart Team
Posts: 8032
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: 7
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: 7
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: 8032
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?

Post Reply