Last post May 17, 2010 04:06 PM by MilagrosLuchini
Mar 01, 2007 06:55 AM|diana_fg|LINK
I can't open a word document from asp.net. I get this error:
InteropServices.COMException (0x800a13e9) There is not enough memory. Save the file.
I get the error in the line 6 of this code:
1 private object missing= System.Reflection.Missing.Value;
3 Word.Application wordApp;
4 wordApp = new Word.Application();
5 Word.Document wordDoc;
6 wordDoc = wordApp.Documents.Open(ref fileName,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
The code works OK with XP Professional, but crashes with a Windows 2003 server. I checked that there is a lot of free memory so it does not seem to be a real memory problem.
I guess this problem may be due to Security issues, as I had many problems to allow the Word component to be used from my process in the 2003 server: I configured the Word DCOM component with the utility DCOMCNFG and granted all the Security options to the
right users. Before doing this the application crashed in line 4 of the previous code with an 'Access denied' error.
The application uses impersonation and Windows authentication, the users running the process are Windows domain users.
(Note: I know that using DCOM Word in a web application is not quite good but I have no chance to change the architecture so I'm not considering this solution).
Thank you for your help.
Mar 05, 2007 03:40 PM|diana_fg|LINK
I found a solution: DCOMCNFG tool /... / DCOM components / Word document / properties / last tab (Identity): select option 'Interactive user' instead of the default option Launching user'. After this change the error was gone.
May 17, 2010 04:06 PM|MilagrosLuchini|LINK