Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

SSL/TLS Error on Geo Code Plugin on using Bing Maps API URL

Posted on by 432

Hi Everyone,

I am getting the below error on Geo code plugin on account entity while retrieving latitude and longitude using Bing maps API URL https://dev.virtualearth.net/REST/v1/Locations?countryRegion={0}&adminDistrict={1}&locality={2}&postalCode={3}&addressLine={4}&o=xml&key={5}.

This used to work before but now it started to show this error.

CRM On premise - Version 8.2

 

74720.Untitled.png

 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>1911c1b2-0bd6-4292-9984-7828b90b0349</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.</Message>
<Timestamp>2018-02-12T12:10:56.5933842Z</Timestamp>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

[MpgStone.Plugins.GeoCodeAccounts: MpgStone.Plugins.GeoCodeAccounts.accountGeoCodeHandler]
[01105ac7-9bbf-e711-80ec-e41f13bbe446: MpgStone.Plugins.GeoCodeAccounts.accountGeoCodeHandler: Create of account]


</TraceText>
</OrganizationServiceFault>

Appreciate your help here.

Thanks 

AKHIL 

*This post is locked for comments

  • Verified answer
    Akhil101 Profile Picture
    Akhil101 432 on at
    RE: SSL/TLS Error on Geo Code Plugin on using Bing Maps API URL

    Hi Andrew,

    I just did an IIS Reset and it seems to be working fine :)

    Thanks for your response though !

    Thanks

    AKHIL

  • Akhil101 Profile Picture
    Akhil101 432 on at
    RE: SSL/TLS Error on Geo Code Plugin on using Bing Maps API URL

    Hi Andrew,

    I tried your line of code to my plugin but same issue.

    Hi Vladimir,

    I registered my plugin in None mode.

    Thanks

    AKHIL R

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: SSL/TLS Error on Geo Code Plugin on using Bing Maps API URL

    Hello Akhil,

    Try to add following code before you calling BingMap endpoint:

    System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SSL/TLS Error on Geo Code Plugin on using Bing Maps API URL

    Hi AKHIL!

    Is your plugin assembly registered in Sandbox mode?
     
    If it is so, you should change its registration to "none".

    Hope it helps

    Please mark it As Answered or Verified if it did help you.

    Thanks

    Vlad
    http://dynamicalabs.com/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans