DocuSign Application

35 views
Skip to first unread message

Charles Hall

unread,
Mar 15, 2023, 8:50:49 PM3/15/23
to Excel-DNA
I am trying to get a Docusign application accessible via ExcelDna.

I have built two projects that are nearly identical.  One is a console application and the other is a XLL/DLL application which includes ExcelDna and is accessed via Application.Run in the vba code.  The code in the console app and DLL is identical.

The console application works, but the XLL fails when trying to authenticate with the Docusign servers.

I am getting the following:
Exception thrown: 'System.Security.Authentication.AuthenticationException' in System.dll

in the XLL which does not happen with the console app.

Has anyone tried this or have any ideas what the problem might be?

Thanks in advance

Craig Crevola

unread,
Mar 15, 2023, 9:25:53 PM3/15/23
to exce...@googlegroups.com
Hi Charles

I am assuming you are using Oauth2. At a guess if day your headers aren't getting set properly, or client credentials aren't set properly. Given your cmd line works it may just be an environmental difference, ie can't locate settings. Docusign should have api logs you can check. Not sure at I use SignNow. 

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/d8cc4843-fa50-4789-bc61-1e2890b77d3an%40googlegroups.com.

C. Augusto Proiete

unread,
Mar 16, 2023, 12:49:40 AM3/16/23
to exce...@googlegroups.com
Hi Charles,

The communication between your addin and DocuSign happens via secure transport and it's likely that your Excel-DNA addin is inheriting the default SSL/TLS configuration from Windows and using an older version (no longer considered secure) - and the DocuSign API you're calling requires a more modern TLS version.

Try enabling TLS 1.2 at the very start of your Excel-DNA addin:


~Augusto


--

Charles Hall

unread,
Mar 17, 2023, 9:02:36 PM3/17/23
to Excel-DNA
Thanks for the help

I rebuilt the application using NetFramework 4.7 - which implied that TLS1.2 was the default, but this still failed

Then I tried the following which was also suggested, and it worked

          var securityProtocol = (int)System.Net.ServicePointManager.SecurityProtocol;
            // 0 = SystemDefault in .NET 4.7+
            if (securityProtocol != 0)
            {
                System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            }



Thanks again!!
Reply all
Reply to author
Forward
0 new messages