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

Discussion

Discussion

Unable to cast transparent proxy to type 'LFSO91Lib.LFDocument'.

posted on January 19, 2016

I have a very simple export script:

 

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
imports System.IO
Imports Laserfiche.RepositoryAccess
imports Laserfiche.DocumentServices
imports PdfExporter91
imports LFSO91Lib




Namespace WorkflowActivity.Scripting.SDKScript
'''<summary>
    '''Provides one or more methods that can be run when the workflow scripting activity is performed.
    '''</summary>
    Public Class Script1
        Inherits SDKScriptClass90
        '''<summary>
        '''This method is run when the activity is performed.
        '''</summary>
        Protected Overrides Sub Execute()
            'Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session

            dim doc as LFdocument = Me.Entry
            dim pdfexp as New PdfExporter
            dim arr() as Byte = pdfexp.ExportPages(doc)

            dim pdf as New FileStream("C:\TestOut\test.pdf", FileMode.CreateNew)
            pdf.Write(arr, 0, arr.Length)

            pdf.Dispose()

            
        End Sub
    End Class
End Namespace

 

 

When I try to execute this, I get the error:
Unable to cast transparent proxy to type 'LFSO91Lib.LFDocument'.

 

And I can't figure out why. Any Ideas?

 

I am certain I've used this same script elsewhere without any issues before. I've made sure all of my imports are accessible and available. 
 

0 0
You are not allowed to reply in this post.

Discussion 1

Sign in to reply to this post.