# API C# CompanyProperties.GetAll()

**URL:** <https://community.hubspot.com/t/api-c-companyproperties-getall/36917>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [May 7, 2021, 12:11pm UTC](https://community.hubspot.com/t/api-c-companyproperties-getall/36917 "2021-05-07T12:11:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0divide](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/0divide/32/91218_2.png) [@0divide](https://community.hubspot.com/u/0divide)\
**Post date:** [May 7, 2021, 12:11pm UTC](https://community.hubspot.com/t/api-c-companyproperties-getall/36917/1 "2021-05-07T12:11:41Z")

</div>

I’m using the last version of [HubSpot.NET](http://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](http://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

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 7, 2021, 7:35pm UTC](https://community.hubspot.com/t/api-c-companyproperties-getall/36917/2 "2021-05-07T19:35:37Z")

</div>

Hello @0divide

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

---

<div class="post-metadata">

**Author:** ![0divide](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/0divide/32/91218_2.png) [@0divide](https://community.hubspot.com/u/0divide)\
**Post date:** [May 10, 2021, 12:31pm UTC](https://community.hubspot.com/t/api-c-companyproperties-getall/36917/3 "2021-05-10T12:31:16Z")

</div>

Finally I found a fix.

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

> **[HubSpot | Software & Tools for your Business - Homepage](https://www.hubspot.com/)**
>
> HubSpot's customer platform includes all the marketing, sales, customer service, and CRM software you need to grow your business.

), 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();
