API C# CompanyProperties.GetAll()

I’m using the last version of HubSpot.NET API since 2 years without any problems.

Since some days my application stop working and nothing change on our custom properties field.

After some investigations I found that my application return an exception when it call CompanyProperties.GetAll();

HubSpot.NET.Core.HubSpotException was unhandled

HResult=-2146233088

Message=Error from HubSpot, JSONResponse=

RawJsonResponse=“”

Source=HubSpot.NET

StackTrace:

at HubSpot.NET.Core.HubSpotBaseClient.SendRequest(String path, Method method, String json)

at HubSpot.NET.Core.HubSpotBaseClient.SendRequest[T](String path, Method method, String json, Func`2 deserializeFunc)

at HubSpot.NET.Core.HubSpotBaseClient.ExecuteList[T](String absoluteUriPath, Object entity, Method method, Boolean convertToPropertiesSchema)

at HubSpot.NET.Api.Properties.HubSpotCompaniesPropertiesApi.GetAll()

…

Is something changed on your side ?
Can someone help me to find the problem ?

Thanks

Hello @0divide

Adding @MichaelC and @danhammari to this topic to see if they have experienced anything similar.

Finally I found a fix.

Before calling “api.CompanyProperties.GetAll()” on this specified Assembly (

), I set the ServicePointManager protocols.
So my code look like this:

var api = new HubSpotApi(Program.Hapikey);

ServicePointManager.Expect100Continue = true;

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;

var properties = api.CompanyProperties.GetAll();