read a word doc

  • Thread starter Thread starter sajithkahawatta
  • Start date Start date
S

sajithkahawatta

i wrote a code to read a doc in asp.net i woked properly in my iis ms
word is installed in this pc. but when i published in another sever in
which there is no ms word instslled it give error in it i used com
reference.

i want to know is there is a way to read a doc when ms word is not
instslled on the server
 
i wrote a code to read a doc in asp.net i woked properly in my iis ms
word is installed in this pc. but when i published in another sever in
which there is no ms word instslled it give error in it i used com
reference.

i want to know is there is a way to read a doc when ms word is not
instslled on the server

Firstly, you're in the wrong newsgroup. This is an ASP.NET question, and
should have been posted to microsoft.public.dotnet.framework.aspnet

Anyway...

Secondly, it's really important for you to understand that server-side
automation of Office is not supported at all by Microsoft, and is highly
unlikely to work in a networked environment:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

The fact that you may have got it working locally is neither here nor
there...

Thirdly, if you are simply wanting to stream a Word document to a client
browser, then it won't matter whether Word is installed on the server or
not, unless you're trying to do something else other than document
streaming.

Fourthly, your client machines will need to have a local copy of Word (or
the Word Viewer) installed otherwise they won't be able to view the document
natively.
 
actually i read a doc and get that data on to asp page to display on
webpage. so must ms word be installd to server
 
sajithkahawatta said:
actually i read a doc and get that data on to asp page to display on
webpage. so must ms word be installd to server


As Marc said, the problem is with the way you "read" a word document. You don't actually
*read* the document from within your own code, you are "asking" a program "winword.exe" to
actually read the document, this is what is called automation, using another program as a
server, in order to perform a task the client (your code) can't actually execute himself.
This programming model isn't supported (and actually doesn't work) in a server like
environment like ASP and SP.NET, the "why" is carefully explained in the KB article pointed
to by Marc, please read it before getting to much involved into something that will probably
never work. Anyway, if you still want to go down that road, you'll need to install MS Word
on the server.

Willy.
 
As Marc said, the problem is with the way you "read" a word document. You
don't actually *read* the document from within your own code, you are
"asking" a program "winword.exe" to actually read the document, this is
what is called automation, using another program as a server, in order to
perform a task the client (your code) can't actually execute himself. This
programming model isn't supported (and actually doesn't work) in a server
like environment like ASP and SP.NET, the "why" is carefully explained in
the KB article pointed to by Marc, please read it before getting to much
involved into something that will probably never work. Anyway, if you
still want to go down that road, you'll need to install MS Word on the
server.

Absolutely correct..

The problem I usually have in getting this over to people is that, whereas
(as you correctly state above) this almost always never works in a networked
production environment, it almost *always* works in a "standard"
single-developer environment i.e. VS.NET 2005, IIS 5.1, Office 2003 and IE
all installed and running locally on the same installation of XP Pro...

Therefore, developers stumble along quite happily with Office automation in
ASP.NET until the day they try to get it working over the network or, even
worse, over the Internet...

Reading the OP, I'm as certain as I can be that this is the case here...
 
Back
Top