Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6217595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:27:14+00:00 2026-05-24T07:27:14+00:00

I ran my code in Visual Studio 2010. It works fine when I publish

  • 0

I ran my code in Visual Studio 2010. It works fine when I publish my application.

In Windows Server 2003 IIS6.0 I get an exception.

The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER)) asp.net mvc

My code is here:

         public ActionResult Getfile(int id)
          {
           Candidate candidate = IcandidateRepository.GetCandidate(id);

        if (candidate.FilePath != null)
        {
            string Filename = Path.GetFileName(candidate.FilePath);
            //string[] filename = candidate.FilePath.Split('\\');
            //foreach (var file in filename)
            //{
            //    Filename = file;
            //}

            Microsoft.Office.Interop.Word.Application wordApplication = new Microsoft.Office.Interop.Word.Application();
            object nullobj = System.Reflection.Missing.Value;
            object filepath = candidate.FilePath;
            object ofalse = false;
            object isvisible = false;
            Microsoft.Office.Interop.Word.Document doc = wordApplication.Documents.Open(ref filepath,
            ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
            ref nullobj, ref  nullobj, ref nullobj, ref nullobj, ref isvisible,
            ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj);
            wordApplication.Visible = false;
            string newfilename = Filename.Replace(".doc", ".html");
            object onewfilename = @"D:\\clg\\" + newfilename;
            object encoded = Microsoft.Office.Core.MsoEncoding.msoEncodingUTF8;
            object encodending = Microsoft.Office.Interop.Word.WdLineEndingType.wdCRLF;
            object oformat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatHTML;
            doc.SaveAs(ref onewfilename, ref oformat, ref nullobj,
                        ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
                        ref nullobj, ref nullobj, ref encoded, ref nullobj,
                        ref nullobj, ref encodending, ref nullobj);
            doc.Close(ref ofalse, ref nullobj, ref nullobj);

            wordApplication.Quit(ref nullobj, ref nullobj, ref nullobj);
            string newfile = onewfilename.ToString();





            if (Filename != null)
            {
                dynamic cmd = System.Diagnostics.Process.Start(newfile);

                return RedirectToAction("CandidateDetails", new { id = candidate.CandidateID });

            }
        }


        return View("FileNotFound");


   }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:27:16+00:00Added an answer on May 24, 2026 at 7:27 am

    You will probably find that Word is showing a dialog box. Make it visible so that you can see what the dialog is.

        wordApp.DisplayAlerts := wdAlertsNone;
    

    will also help suppress warning dialogs

        doc.Saved = true;
    

    will stop it from prompting you to save changes when you close the document.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Visual Studio 2008 Team System, I just ran Code Analysis (from the Analyze
I am coding an unmanaged C++ console application on Windows 7 using Visual Studio
I have an MVC 3 application that works fine when running locally from visual
I ran into an annoying problem: the following code gives a warning in Visual
I have a Visual Studio 2010 solution that contains C# (managed), C++/CLI (unmanaged) and
I just wrote a simple C++ program in Visual Studio 2010 and I use
I compiled my trayicon utility c++ code in visual studio 2005 express edition and
I want to create a Visual Studio Extension. That extension, whenever ran by the
I am using visual studio 2010. It seems that out of nowhere, I can't
I have the following C++ program and ran it using Visual Studio 2008 on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.