harishaidary submitted May 26 2016
This simple example code shows you how to use the .NET SDK in order to make API calls to eSignLive through a proxy server.
Rate this Code Share

Comments

AjayRathod1122 | Posts: 2

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

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off