Glad you got it sorted. Just be very aware of the concurrency issues when
using something like Word on a server. If more than one user accesses it at
a time, you can end up in all sorts of bother.

On Wed, Oct 13, 2010 at 12:08 PM, stapes <[email protected]> wrote:

> Ah. I finally cracked it.
>
> The solution is a little complicated. I got the gen here:
>
> http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/08f13e9d-895c-4102-b6d9-e327af8cf8c0
>
> "First off copy the CLSID from the error window that appears in
> VB.NET. Access the registry via Start, Run, Cmd, RegEdt32, enter. Once
> the registry editor loads up, do a search (ctrl F3) on that specific
> CLSID (I didn't include the braces, but it shouldn't matter). The
> registry should find a key located under the HKEY_CLASSES_ROOT ->
> CLSID subkey. Expand this key and you should see 3 nodes:
> ProxyStubCLSID,ProxyStubCLSID32 and the important one - TypeLib.
> Essentially what is happening is that when you make the COM call to a
> specific Office assembly. The assembly opens up the registry and finds
> this key which gives it the CLSID of the TypeLib it must call in order
> to initiate a call to the COM.
>
> Under the TypeLib key copy the (Default) Entry (It should be another
> long CSLID key). Now the easiest way to find this new key entry
> relating to the CLSID, is to go back up to the root key,
> HKEY_CLASSES_ROOT and look for the TypeLib subkey. I did this by
> simply pushing "T" on the keyboard till I got to the all the "T's" on
> the level below the HKEY root. Once you find this key, highlight the
> key and do a search (Ctrl F3) from this key for the TypeLib CLSID that
> you copied earlier. Once you find it, expand it and see if there are
> multiple versions of the typelib i.e. 8.3, 8.4, 8.5. You want to
> eliminate the the later versions that are pointing to non-existant
> TypeLib's."
>
> I found here 8.3 and 8.4. Gingerly, I deleted the key 8.4, and it
> worked.
>
> On 13 Oct, 11:52, Jamie Fraser <[email protected]> wrote:
> > Are you sure word has been installed correctly on your Server?
> >
> >
> >
> > On Wed, Oct 13, 2010 at 11:49 AM, stapes <[email protected]> wrote:
> > > OK. Today I learned about impersonation. Not Mike Yarwood. Added this
> > > line to web.config:
> >
> > > <identity impersonate="true" userName="blah/blahblah"
> > > password="blahblah"/>
> >
> > > Moved past the error I had yesterday, and got a new one. That's
> > > progress!
> >
> > > Here is todays error:
> > > Unable to cast COM object of type 'Word.ApplicationClass' to interface
> > > type 'Word._Application'. This operation failed because the
> > > QueryInterface call on the COM component for the interface with IID
> > > '{00020970-0000-0000-C000-000000000046}' failed due to the following
> > > error: Library not registered. (Exception from HRESULT: 0x8002801D
> > > (TYPE_E_LIBNOTREGISTERED)).
> >
> > > I don't see why we shouldn't use these MS applications. They are there
> > > to be used, and integrate well with the other products. The only
> > > annoying thing is wasting 2 or 3 days because Microsoft are so worried
> > > someone might use a product without paying for it.
> >
> > > Anyway - any ideas on this new error?
> >
> > > On 12 Oct, 14:34, stapes <[email protected]> wrote:
> > > > You don't recommend running word then? What are the alternatives?
> > > > I regularly use Excel and Outlook from web applications too.
> >
> > > > On 12 Oct, 14:30, Stephen Russell <[email protected]> wrote:
> >
> > > > > On Tue, Oct 12, 2010 at 8:24 AM, stapes <[email protected]>
> > > wrote:
> > > > > > Hi
> >
> > > > > > I have built a website that writes into a Word Document template.
> It
> > > > > > works fine on my development machine, but when I move it to the
> live
> > > > > > server, it crashes with the following error:
> >
> > > > > > Retrieving the COM class factory for component with CLSID
> > > > > > {000209FF-0000-0000-C000-000000000046} failed due to the
> following
> > > > > > error: 80070005.
> >
> > > > > > My aspx.cs page has the following:
> > > > > > using Microsoft.Office;
> >
> > > > > > In the /Bin folder is the dll file office.dll and
> interop.word.dll
> >
> > > > > > In the add reference (using Visual Studio 2005) there is
> Microsoft
> > > > > > Office 11.0 Object Library and Microsoft Office 12.0 Object
> Library
> > > > > > and Microsoft Word 11.0 Object library.
> >
> > > > > > I found a webpage that accurately describes my problem:http://
> >
> > >www.computerperformance.co.uk/Logon/code/code_80070005.htm#Solution_t.
> ..
> >
> > > > > > I don't understand the answer.
> >
> > > > > ---------------------------------------------------
> >
> > > > > You are using Word in your application and ASPNET doesn't have
> rights
> > > > > to run Word.  Which is a good thing.  You have fees to be paid to
> M$
> > > > > to use Word in a server application.  There is also the security
> > > > > aspects of having Word run macros on your server.  Talk about a
> > > > > nightmare for IT Admin.
> >
> > > > > --
> > > > > Stephen Russell
> >
> > > > > Sr. Production Systems Programmer
> > > > > CIMSgts
> >
> > > > > 901.246-0159 cell- Hide quoted text -
> >
> > > > > - Show quoted text -- Hide quoted text -
> >
> > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -

Reply via email to