Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics

Replies Created

Reply to: Proxy Configuration (.NET SDK)

0 votes

Hello ,

I've shared code details in below :

  ProxyConfiguration httpProxyConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration()
                    .WithHttpHost(_proxyConfiguration.GetHost())
                    .WithHttpPort(_proxyConfiguration.GetHttpPort())
                    .WithCredentials(_proxyConfiguration.GetUserName(), _proxyConfiguration.GetPassword())
                    .Build();
                    Boolean allowAllSSLCertificates = false;

 EslClient eslClient = new EslClient(_apiKey, _apiUrl, allowAllSSLCertificates,                        httpProxyConfiguration);


                    FileStream fs = new FileStream(model.FilePath, FileMode.Open, FileAccess.Read);
                    Signer mysigner = SignerBuilder.NewSignerWithEmail(data.Email)
                                                    .WithFirstName(data.FirstName)
                                                    .WithLastName(data.LastName)
                                                    .WithCustomId("Signer1")
                                                    .Build();
                    DocumentPackage superDuperPackage = PackageBuilder
                   .NewPackageNamed("Test Document")
                   .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings())
                   .WithSigner(mysigner)
                   .WithDocument(DocumentBuilder.NewDocumentNamed(model.FileName)
                   .FromStream(fs, DocumentType.PDF)
                   .EnableExtraction())
                   .Build();
                    string applicationVersion = eslClient.SystemService.GetApplicationVersion();
                    PackageId packageId = eslClient.CreatePackage(superDuperPackage);
                    eslClient.SendPackage(packageId);

 

I've got the issue "Could not create a new package. Exception: Object reference not set to an instance of an object." on " string applicationVersion = eslClient.SystemService.GetApplicationVersion();" Or "PackageId packageId = eslClient.CreatePackage(superDuperPackage);".
 

Can you please help to resolve the issue ?

Let me know if any idea about that.

Best Regards
Ajay


Subscriptions

Topics Replies Freshness Views Users
1 3 years 10 months ago 23
Profile picture for user Duo_Liang

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.