GetUpdatedPackagesWithinDateRange Unhandled Exception
Wednesday, March 22, 2017 at 07:07amI'm having some difficulty implementing DownloadDocumentsDateRange posted previously in this forum. When the following code is executed the EslClient.PackageService.GetUpdatedPackagesWithinDateRange function throws an unhandled exception stating that an unexpected character was encountered while parsing value. I assume the string it's trying to parse is the response from eSignLive but I'm at a loss on how to debug it. Is there a way to capture and view this response? Is there documentation on the EslClient class that could shed light on what value the GetUpdatedPackagesWithinDateRange is expecting?
using System; using System.IO; using System.Threading; using Silanis.ESL.SDK; using System.Diagnostics; using Silanis.ESL.SDK.Builder; 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 = "***Redacted***"; int httpProxyPort = ***Redacted***; //Build Proxy Configuration ProxyConfiguration httpProxyConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration() .WithHttpHost(httpProxyURL) .WithHttpPort(httpProxyPort) .Build(); //Set EslClient EslClient eslClient = new EslClient(apiKey, apiUrl, httpProxyConfiguration); //starting point to retrieve completed packages int index = 1; //Retrieve first 50 completed packages. Packages are returned as a page from eSignLive. PagecompletedPackages = eslClient.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus.COMPLETED, new PageRequest(index, 50), DateTime.Today.AddDays(-30), DateTime.Now); while (index Here's the full stack trace. Silanis.ESL.SDK.EslException was unhandled HResult=-2146233088 Message=Could not get package list. Exception: Unexpected character encountered while parsing value: <. path="" line="" position="" source="Silanis.ESL" stacktrace:="" at="" silanis.esl.sdk.services.packageservice.getupdatedpackageswithindaterange="" status="" pagerequest="" request="" datetime="" from="" to="" downloaddocumentsdaterange.downloaddocuments.main="" args="" in="" system.appdomain._nexecuteassembly="" assembly="" string="" system.appdomain.executeassembly="" assemblyfile="" evidence="" assemblysecurity="" microsoft.visualstudio.hostingprocess.hostproc.runusersassembly="" system.threading.threadhelper.threadstart_context="" state="" system.threading.executioncontext.runinternal="" executioncontext="" contextcallback="" callback="" object="" boolean="" preservesyncctx="" system.threading.executioncontext.run="" system.threading.threadhelper.threadstart="" innerexception:="" hresult="-2146233088" linenumber="0" lineposition="0" message="Unexpected" character="" encountered="" while="" parsing="" value:="" newtonsoft.json.jsontextreader.parsevalue="" newtonsoft.json.jsontextreader.readinternal="" newtonsoft.json.jsontextreader.read="" newtonsoft.json.serialization.jsonserializerinternalreader.readfortype="" reader="" jsoncontract="" contract="" hasconverter="" newtonsoft.json.serialization.jsonserializerinternalreader.deserialize="" type="" objecttype="" checkadditionalcontent="" newtonsoft.json.jsonserializer.deserializeinternal="" newtonsoft.json.jsonconvert.deserializeobject="" value="" jsonserializersettings="" settings="" silanis.esl.sdk.eslserverexception..ctor="" errordetails="" webexception="" cause="" silanis.esl.sdk.internal.httpmethods.gethttpjson="" apitoken="" accepttype="" silanis.esl.sdk.restclient.get=""> Thanks for taking a look!
Reply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Thursday, March 23, 2017 at 06:40amReply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Wednesday, March 22, 2017 at 08:51amReply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Thursday, March 23, 2017 at 05:58amReply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Thursday, March 23, 2017 at 07:19amReply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Thursday, March 23, 2017 at 07:51amReply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Thursday, March 23, 2017 at 07:51amReply to: GetUpdatedPackagesWithinDateRange Unhandled Exception
Thursday, March 23, 2017 at 07:55am