Error 2147221395 "Object doesn't support IViewObject interface"

We have some asp sites that use the 8.5 version of imanagedll to get copies of documents from the DMS database.  They've worked fine for a long time.  A few days ago, this stopped working in our development environment -- one day it worked, the next it didn't.  It doesn't appear that any changes were made in the environment, but a lot of people can touch it, so it's possible something was done that I'm not aware of.

 

The error is thrown on a line of vbscript: 

 

objDoc(objDoc.count).GetCopy DownloadDirectoryPath & "\" & sFileName ,nrNativeFormat

 

The path and file name are valid.  There are no errors connecting, creating a session, searching for the document, etc; the error just occurs on this GetCopy.

 

Can anyone shed some light on this?

Comments

  • should't it read

    "objDoc.GetCopy DownloadDirectoryPath & "\" & sFileName ,nrNativeFormat"  ?

    I'd also look at getting some change management in place!!!

    c# wuld allow for "try, catch" and checking id object is...

    there's also a soap and Rest API for web, or the iwl protocol handler. i've also got a "getdocx.aspx" basic c# web  interface for worksite for intranet links like this

  • The syntax I quoted makes sure that the latest version of the document will be returned.  It has worked correctly for years and continues to work in other sites.  The error, on the other hand, just started suddenly with no changes made to the code, and occurs only in the dev environment.

     

    I don't have the luxury of doing this in a different way at this point.  The entire site is being redesigned, but that project won't be complete for some time and I can't make major changes in the old code.  I just need to fix this error.

  • OK

    to get the latest version you should use the LatesdtVerion property off theiMandDocument object, here's a sample I've used:

    objdoc.LatestVersion.GetCopy(Path.GetTempFileName(),imGetCopyOptions.imNativeFormat);

    IVewiObject isn't worksite however, it's to do with the windows OLE interface, so I'm not why this error's being raised.
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms680763(v=vs.85).aspx

    You can turn on middlewarelogging on a web server to see the Worksite API calls and errors being raised

     

Sign In or Register to comment.