Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics
I'm having some difficulty implementing DownloadDocumentsDateRange posted previously in this forum.

Replies Created

Reply to: GetUpdatedPackagesWithinDateRange Unhandled Exception

0 votes
Hi Haris, Thanks for the suggestion! I've commented out the proxy info and removed httpProxyConfiguration from the instantiation of eslClient. Now I'm getting a new exception from the same line of code, see below. Attached is the stdout.
using System;
using System.IO;
using System.Threading;
using Silanis.ESL.SDK;
using System.Diagnostics;

namespace DownloadDocumentsDateRange
{
    class DownloadDocuments
    {
        public static void Main(string[] args)
        {
            //API Identification Strings
            String apiUrl = "https://sandbox.esignlive.com/api";
            String apiKey = "***Redacted***";

             /*
             //Proxy info
             string httpProxyURL = "";
             int httpProxyPort = ;

             //Build Proxy Configuration
             ProxyConfiguration httpProxyConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration()
             .WithHttpHost(httpProxyURL)
             .WithHttpPort(httpProxyPort)
             .Build();

             //Create EslClient
             EslClient eslClient = new EslClient(apiKey, apiUrl, httpProxyConfiguration);
             */

            EslClient eslClient = new EslClient(apiKey, apiUrl);

            //starting point to retrieve completed packages
            int index = 1;

            //Retrieve first 50 completed packages. Packages are returned as a page from eSignLive.
            Page completedPackages = eslClient.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus.COMPLETED, new PageRequest(index, 50), DateTime.Today.AddDays(-30), DateTime.Now);
            
            while (index 

Here's the new exception.

Silanis.ESL.SDK.EslException was unhandled
  HResult=-2146233088
  Message=Could not get package list. Exception: Object reference not set to an instance of an object.
  Source=Silanis.ESL
  StackTrace:
       at Silanis.ESL.SDK.Services.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus status, PageRequest request, DateTime from, DateTime to)
       at DownloadDocumentsDateRange.DownloadDocuments.Main(String[] args) in ***Redacted***:line 38
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
       HResult=-2147467261
       Message=Object reference not set to an instance of an object.
       Source=Silanis.ESL
       StackTrace:
            at Silanis.ESL.SDK.Internal.HttpMethods.GetHttpJson(String apiToken, String path, String acceptType)
            at Silanis.ESL.SDK.RestClient.Get(String path)
            at Silanis.ESL.SDK.Services.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus status, PageRequest request, DateTime from, DateTime to)
       InnerException: 
Thanks, Keith

Attachments

Reply to: GetUpdatedPackagesWithinDateRange Unhandled Exception

0 votes
No, it appears I can't make any other calls without the proxy. Same "Object reference not set to an instance of an object" exception. Adding the proxy info back in yields the "Unexpected character encountered while parsing value" error again. It's starting to appear that our security is preventing the call from leaving our network. I'll work in that direction. I'll update this thread with what I find. Thanks for the help!

Subscriptions

Topics Replies Freshness Views Users
I'm having some difficulty implementing DownloadDocumentsDateRange posted previously in this forum.
7 7 years 1 month ago 53
Profile picture for user harishaidary

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.