none
Is the two step necessary to solve 80070005 Access denied error? RRS feed

  • Question

  • I'm writing to confirm a solution.

    This is the solution address: https://www.ryadel.com/en/office-interop-dcom-config-windows-server-iis-word-excel-access-asp-net-c-sharp/, it says when "80070005 Access denied", we can solve it by "Right-click the entry and select Properties", which have two stepsGo to the Identity tab, where you’ll see three radio buttons: The Interactive User, The Launching User and This User. Select This User, then put the credentials of the account who installed MS Office – or an administrative account.

    Now we write this two steps in our support document to help client using office conveniently, but the Information Technology Division of our client want to know is this the necessary step to solve the 80070005 Access denied error. If true, they want the office story.

                                                                                                                         Best wishes

    Tuesday, June 25, 2019 9:47 AM

All replies

  • Hi,

    Would you provide the detail information about your issue such as Event Viewer log or error message capture.

    Make sure your issue is same with the description in your provided link. If yes, we could try the steps to enter user certificate. However, this action will not a result measure for all 80070005 access deny issue, also not always take into effort for your issue, but try it will help us to narrow down our troubleshooting scope.

    At last, in a word, we would appreciate to see your exact error message.

    Bests, 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, June 26, 2019 6:55 AM
    Moderator
  • The question is we write down some code using Microsoft.Office.Interop.dll, and if we don't take the two steps, the variable "wordDocument" is null. If we take the two steps, the code run normally. There is no error or logs can take.

    This is the code:

    Microsoft.Office.Interop.Word.Application wordApplication = null;
                object paramMissing = Type.Missing;
                Document wordDocument = null;

                string strOrg = "000209FF-0000-0000-C000-000000000046";
                //string strReg = "00020906-0000-0000-C000-000000000046";

                try
                {
                    wordApplication = Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(strOrg))) as Microsoft.Office.Interop.Word.Application;

                    object paramSourceDocPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "word.docx");
                    string paramExportFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Guid.NewGuid().ToString() + ".pdf");

                    logger.Debug(paramSourceDocPath);
                    logger.Debug(paramExportFilePath);

                    WdExportFormat paramExportFormat = WdExportFormat.wdExportFormatPDF;
                    bool paramOpenAfterExport = false;
                    WdExportOptimizeFor paramExportOptimizeFor = WdExportOptimizeFor.wdExportOptimizeForPrint;
                    WdExportRange paramExportRange = WdExportRange.wdExportAllDocument;
                    int paramStartPage = 0;
                    int paramEndPage = 0;
                    WdExportItem paramExportItem = WdExportItem.wdExportDocumentContent;
                    bool paramIncludeDocProps = true;
                    bool paramKeepIRM = true;
                    WdExportCreateBookmarks paramCreateBookmarks = WdExportCreateBookmarks.wdExportCreateHeadingBookmarks;//.wdExportCreateWordBookmarks;
                    bool paramDocStructureTags = true;
                    bool paramBitmapMissingFonts = true;
                    bool paramUseISO19005_1 = false;

                    // open doc
                    wordDocument = wordApplication.Documents.Open(
                        ref paramSourceDocPath, ref paramMissing, ref paramMissing,
                        ref paramMissing, ref paramMissing, ref paramMissing,
                        ref paramMissing, ref paramMissing, ref paramMissing,
                        ref paramMissing, ref paramMissing, ref paramMissing,
                        ref paramMissing, ref paramMissing, ref paramMissing,
                        ref paramMissing);

                    // save as pdf
                    if (wordDocument != null)
                    {
                        logger.Info("open doc success.");
                    }
                    else
                    {

                        logger.Error("open doc error,wordDocument is null.");
                    }
                }

    Hoping hearing from you soon,thank you!

    Best wishes

    Wednesday, June 26, 2019 10:06 AM
  • Hi,

    Thank you for your reply.

    As code consult is out of our Windows support scope, we recommend to ask for help from MSDN forum with the link below.

    https://social.msdn.microsoft.com/Forums/en-US/home

    Bests,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, June 27, 2019 9:00 AM
    Moderator