title: ApplicationClass Documents.Open returns null for ASP.NET site on 64bit system
body: <p>I have a problem with opening word document from ASP.NET site. The solution works fine on Windows 2003 Server, but doesn't work on Windows 2008 server x64 and Windows 7 x64.</p>
  
  <p>To simplify the solution I've created an ASP.NET MVC 3 site and try to open word document from there.</p>
  
  <p>Environment I have: Windows 7 x64 and MS Office 2010 x64</p>
  
  <p>The code for opening adocument is the following:</p>
  
  <pre><code>    public ActionResult WordTest()
      {
          var fullFileName = @"C:\inetpub\wwwroot\fpub\TestDocument.docx";
          var impersonation = new ImpersonationManager();
          impersonation.Impersonate();
          try
          {
              var application = new Application();
  
              try
              {
                  Type documentsType = application.Documents.GetType();
                  var document =(_Document)documentsType.InvokeMember("Open", BindingFlags.InvokeMethod, null, application.Documents,
                                                 new object[] {fullFileName});
  
                  try
                  {
                      return View(new ModelData {Result = document == null ? "Bad" : "OK"});
                  }
                  finally
                  {
                      if (document != null)
                      {
                          document.Close(false);
                          Marshal.ReleaseComObject(document);
                      }
                  }
              }
              finally
              {
                  application.Quit(false);
                  Marshal.ReleaseComObject(application);
              }
          }
          finally
          {
              impersonation.CloseImpersonation();
          }
    }
  </code></pre>
  
  <p>Firstly, I make impersonation to use trusted domain user account for word interaction (ImpersonationManager is a custom component). This user has rights to open\save\close Word Application. In my tests this is my own account :)</p>
  
  <p>Then I create Word application instance. WINWORD process is started under impersonated account.</p>
  
  <p>But after "Open" method is invoked it always returns null. No exceptions, no info in event viewer.</p>
  
  <p>Moreover Word process loads the CPU on 100% after this (1 core of CPU).</p>
  
  <p>If I run the same code (without impersonation) as console application it works fine.</p>
  
  <p>I wonder what can be the problem here?</p>
  
  <p><strong>Update</strong> It works fine if Visual Studio Development server is used as host for the site</p>