Bjones82 | Posts: 27

Creating package error help

0 votes
We have a time when we keep getting this error Silanis.ESL.SDK.EslException: Could not create a new package. Exception: Unexpected character encountered while parsing value: . Path '', line 0, position 0. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.ReadInternal() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Silanis.ESL.SDK.EslServerException..ctor(String message, String errorDetails, WebException cause) at Silanis.ESL.SDK.Internal.HttpMethods.PostHttp(String apiToken, String path, Byte[] content) at Silanis.ESL.SDK.RestClient.Post(String path, String jsonPayload) at Silanis.ESL.SDK.Services.PackageService.CreatePackage(Package package) --- End of inner exception stack trace --- at Silanis.ESL.SDK.Services.PackageService.CreatePackage(Package package) at Silanis.ESL.SDK.EslClient.CreatePackage(DocumentPackage package) This is how we are making the package: Dim NewPackage As DocumentPackage NewPackage = PackageBuilder.NewPackageNamed("Test") _ .ExpiresOn() _ .WithEmailMessage("Test") _ .DescribedAs("Test") _ .Build() Dim PackageId As PackageId = Client.CreatePackage(NewPackage)

mwilliams | Posts: 957

Reply to: Creating package error help

0 votes
Is that the exact code you're passing in "ExpiresOn"? If you remove that line, does the error go away? It looks like it's having an issue with the ''.

Bjones82 | Posts: 27

Reply to: Creating package error help

0 votes
No that is not the exact code we are using sorry I just wrote that as a reference. We are passing this: ExpireDate = a date in the future with the object type of Date Dim NewPackage As DocumentPackage NewPackage = PackageBuilder.NewPackageNamed(“Test”) _ .ExpiresOn( ExpireDate ) _ .WithEmailMessage(“Test”) _ .DescribedAs(“Test”) _ .Build() Dim PackageId As PackageId = Client.CreatePackage(NewPackage)

mwilliams | Posts: 957

Reply to: Creating package error help

0 votes
That's what I thought, at first, but wasn't sure based on the error. :) Thanks for the clarification. I haven't tried using the .NET SDK in VB, yet. I'll have to give that a go, tomorrow morning. I'll try reproducing the error. Do you know what version of the SDK you're using?

Bjones82 | Posts: 27

Reply to: Creating package error help

0 votes
Yeah unfortunately my office does everything mostly in VB. We are using version 10.8.2.0

mwilliams | Posts: 957

Reply to: Creating package error help

0 votes
Thanks. Ran out of time, yesterday. Checking this out, now. :)

mwilliams | Posts: 957

Reply to: Creating package error help

0 votes
I do not have any problems creating a package with any of the above lines of code included. I am using the 10.10.1 SDK, so it could be a version thing of some sort.

Bjones82 | Posts: 27

Reply to: Creating package error help

0 votes
We have solved this issue. Our customer has their own Silanis server on premise. The Silanis.ESL.dll version 10.8.2 was the problem. After we updated to version 10.9.0 the problem went away. Our customer contacted their Silanis rep and they were told that the issue occurs with that version of a dll and a Silanis server that is not your standard web based one. Thanks for the help!

mwilliams | Posts: 957

Reply to: Creating package error help

0 votes
Great to hear that it's working, now!

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