Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / June 2004



Tip: Looking for answers? Try searching our database.

Strange error in OLE Automation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
The Pooka - 24 Jun 2004 15:20 GMT
Hi all,

i'm trying to open and handle a Word (XP) application from my aspx page (on
a Win2000 server, lastest SP on both server and office): i can instantiate
it (i've tried with "new" keyword or also the CreateObject method, they both
do work), but when i execute w.Documents.Add it throws a COM Exception that
says "Out of memory". I can't understand what is the real problem, cause if
i use the same code on the same machine in a win32 application (vb.net) it
works perfectly. So Office installation is *maybe* OK...the only difference
between two cases is that winword.exe executed from asp.net app runs under
IWAM user and from win 32 app runs under administrative user. So i tried to
login with IWAM user and do the couple of steps needed to configure Word for
that user (first-time run stuff, like giving name initials...) but as i
expected it didn't help.
I know that Microsoft do not support OLE Automation in a Server-Side
enviroment, but i can't figure out why it should not work from asp.net when
it works in win32 enviroment...could it be something dependant to IIS
settings (like particular security settings...but what?) ?

I hope you could help...

Thanks
Paul Clement - 25 Jun 2004 16:37 GMT
¤ Hi all,
¤
¤ i'm trying to open and handle a Word (XP) application from my aspx page (on
¤ a Win2000 server, lastest SP on both server and office): i can instantiate
¤ it (i've tried with "new" keyword or also the CreateObject method, they both
¤ do work), but when i execute w.Documents.Add it throws a COM Exception that
¤ says "Out of memory". I can't understand what is the real problem, cause if
¤ i use the same code on the same machine in a win32 application (vb.net) it
¤ works perfectly. So Office installation is *maybe* OK...the only difference
¤ between two cases is that winword.exe executed from asp.net app runs under
¤ IWAM user and from win 32 app runs under administrative user. So i tried to
¤ login with IWAM user and do the couple of steps needed to configure Word for
¤ that user (first-time run stuff, like giving name initials...) but as i
¤ expected it didn't help.
¤ I know that Microsoft do not support OLE Automation in a Server-Side
¤ enviroment, but i can't figure out why it should not work from asp.net when
¤ it works in win32 enviroment...could it be something dependant to IIS
¤ settings (like particular security settings...but what?) ?
¤

Server side automation of Office apps is not recommended for a number of reasons. One is that the
Office applications typically involve user interaction with a visual interface and when an error
occurs there must be some way to provide the user with this information. Web apps are not suited for
handling such scenarios. You can find a list of a number of other issues in the following MS KB
article:

INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?scid=kb;en-us;257757


Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.