I know this would be a duplicate question. I tried all the ways suggested in multiple websites, but my issue didn't get solved. I am getting the below error
System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at
Application appWord = new Application();
wordDocument = appWord.Documents.Open(strFilePath);
wordDocument.ExportAsFixedFormat(pdfPath, WdExportFormat.wdExportFormatPDF);
appWord.Quit();
Same solution working fine in Local, but in in server its giving the above error. I have added 'Network Service' user to 'Microsoft Word 97 - 2003 Document'and given all the permissions, Do these changes required server reboot?, and created desktop folders as well and I have MS word 2016 installed on web server. Thanks in advance.