|
-
Mar 29th, 2012, 03:23 PM
#1
Thread Starter
Fanatic Member
Word Interop
I added a reference to the Word Interop Assembly and wrote a page that opened a Word document so I could get at the contents. All was fine.
I then published the site to a server and the site won't run ... the error message is cannot load the Word Interop Assembly.
I don't understand - this assembly is in the GAC - surely this should be available on the server?
Whenever you add a reference normally, you don't have to do anything to the server ... what is going on?
Thanks for any help.
-
Mar 29th, 2012, 05:37 PM
#2
Re: Word Interop
 Originally Posted by Webskater
I added a reference to the Word Interop Assembly and wrote a page that opened a Word document so I could get at the contents.
Not 100% sure because you use the interop but i think this will not play on a server-client scenario.Remember you cannot just open up apps from an internet site unless if you make an ActiveX or something.The test you did at your machine opened because that time you act like the server so it server-server scenario.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 29th, 2012, 05:55 PM
#3
Thread Starter
Fanatic Member
Re: Word Interop
 Originally Posted by sapator
Not 100% sure because you use the interop but i think this will not play on a server-client scenario.Remember you cannot just open up apps from an internet site unless if you make an ActiveX or something.The test you did at your machine opened because that time you act like the server so it server-server scenario.
Thanks for your reply. I don't understand though ... I realise it's hard to open an existing document using the Interop - but there are methods for creating a new document and saving it, for example.
But it isn't falling over when I try to run the page where I open the Word document ... the site just won't run at all. It says the assembly cannot be loaded. So it can't find the assembly.
I'm under the impression that assemblies in the GAC do not have to be published to the server, they should already be on there?
The situation is ... a load of Word documents are in a folder on a server. I need to loop through the files in the folder, open them, extract their contents and add all the contents into a new Word document and save it. It will probably run in a Web service on the server - so the client/server thing should not be an issue.
But not loading the assembly is an issue.
-
Mar 30th, 2012, 05:49 PM
#4
Re: Word Interop
Ok.Try putting the dll in your bin folder of the site(if it is a web site and not a web project).Also can you show me the web.config declaration you do for the assembly?There is a trick there that might help if it's what i suspect.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|