Interop.word service

-5

Good afternoon, I'm using microsoft.office.interop.word to convert pdf documents to pdf in WCF, however the only interopr to run WCF is online only interopr does not work, where it is necessary to restart the WCF service for it works again.

Does anyone have an idea what it can be?

    
asked by anonymous 20.09.2017 / 22:58

1 answer

0

Maybe it could be a version conflict of the site, using Interop you should run your application as 32bits. Configure in the IIS application pool to run the application as 32-bit. The server must have installed the version of the office that you are using Interop as well.

After using Interop, you must release the object.

try
{
    System.Runtime.InteropServices.Marshal.ReleaseComObject(msWordDoc);
    msWordDoc = null;
}

catch (Exception exReleaseObject)
{
    msWordDoc = null;
    //   Console.WriteLine(CMSResourceFile.REALESE_FAILED+ exReleaseObject);

}
finally
{
    GC.Collect();
    GC.WaitForPendingFinalizers();
    GC.Collect();
    GC.WaitForPendingFinalizers();
}

Maybe this answer will help you.

a>

    
25.09.2017 / 16:41