You are viewing limited content. For full access, please sign in.

Question

Question

Receiving Laserfiche.RepositoryAccess.MalformedDataException when retrieving documents using SDK

asked on January 14 Show version history

When I run the code below I am getting a Laserfiche.RepositoryAccess.MalformedDataException.  The folder we are searching contains about 4000 documents.

 var settings = new SearchListingSettings();
 settings.AddColumn(SystemColumn.Id);
 settings.AddColumn(SystemColumn.Name);
 var search = new Search(session);
 search.Command = "({LF:LOOKIN=\"" + proxyLocation + "\"})";
 search.FuzzyType = FuzzyType.None;
 search.Run();
 var listing = search.GetResultListing(settings, numberPreload);

for (var row = 1; row <= listing.RowCount; row++)
{
     var id = (int)listing.GetDatum(row, SystemColumn.Id);

If numberPreload contains a value higher than the total number of documents in the folder then I get the error on this line

var listing = search.GetResultListing(settings, numberPreload);

If I set numberPreload lower than the total number of documents in the folder I get the error on this line.

var id = (int)listing.GetDatum(row, SystemColumn.Id);

What's interesting (to me anyway) is that I always get the error on the row that is 2 higher than the value of numberPreload.  If numberPreload = 1 then I get the error on row 3.  If numberPreload = 100 then I get the error on row 102.

First of all, can anybody help me determine what is causing this issue?  

And secondly, I am assuming the reason I get this error is because the results being returned is not XML (or whatever format the library is expecting).  Is there anyways I can log the actual results coming back from server so I can see what is being returned?

 

Also, I tried using FI.OpenFolderListing() with the same results.

 

I am using version 10.3.0.242 of the SDK (Laserfiche.RepositoryAccess.dll and Laserfiche.DocumentServices.dll)

 

AHHHHH....Problem only occurs when I use .NET 6.0!  *sigh*

0 0

Answer

SELECTED ANSWER
replied on January 14

Yes, this is likely the same issue as your other thread. .Net 6 will load .Net 4 assemblies but complain when you attempt to use a class or method that does not exist.

0 0
replied on January 14

It would be nice if Laserfiche more quickly released new versions which supported the latest version of .Net.  Many library developers will release new versions very close to the time of .Net releases.  Our company likes to stay at the cutting edge of technology and it is difficult to do when the third party libraries we use don't.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.