Maybe it may be a conflict of the site version, using Interop you should run your application as 32bits. Configure in the IIS application pool to run the application as 32 bits. The server must have installed the office version 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 that answer will help you.
https://stackoverflow.com/questions/44544295/keeping-one-interop-office-application-alive-until-iis-restart-for-all-users-i
But do you have a mistake? "It doesn’t work" which means?
– Renato Afonso
It means that the service is online but the Interop does not work the routine that Convert word to pdf through the Interop, does not return error and when left wcf works again.
– Zica
To help it would be interesting for you to post what you are trying to do and which error message occurs. There may be hundreds of reasons.
– Andre Mesquita
And the code from where you are using the Interop? Improve this explanation there, otherwise it is difficult right!
– Mateus