[Mono-aspnet-list] Finding reason for Internal Server Error 500 when opening openXML document
Jan van der watt
janvanderwatt at gmail.com
Tue Oct 27 22:42:18 EDT 2009
Hi,
I'm trying to use Microsoft's DocumentFormat.OpenXml.dll on Mono 2.4 on
openSuse 11.1 to modify a 2007 docx Word file. I get a "Error 500 - Internal
Server error" as soon as I hit this line of code:
WordprocessingDocument package =
WordprocessingDocument.Open(template_filename, true);
This issue is potentially not specific to the ASP part of Mono, but since it
causes a Server Error, perhaps it is. Searching for this (e.g. "Internal
Server Error WordprocessingDocument.Open") on Google returns a lot of
irrelevant results.
The code works on ASP.NET on XP.
I have:
- checked that the file exists (if ( File.Exists(template_filename) ) { ...
}) (it's 177 kB, expanded, 902 kB)
- given full rights to the file (0777)
- checked that DocumentFormat.OpenXml.dll is loaded (if I rename it, I get
the appropriate "Could not load file or assembly 'DocumentFormat.OpenXml,
Version=2.0.4330.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one
of its dependencies."error)
- installed WindowsBase.dll (3.0.0.0, via mono-winfxcore 1.0-1.8)
- tried using XP's WindowsBase.dll (but this turned out to be a bad idea as
it relies on other WIN32 dll's)
Unfortunately, since the server aborts, it isn't possible to get a more
detailed message.
So, I'd really appreciate some help discovering:
- what causes a server error of the magnitude that it aborts without more
information
- if it can be fixed (i.e. some guidelines on how to get Microsoft's openXML
going on Mono (I'm not aware of any licensing issues))
- how to fix it
Sample code can be viewed at: http://diag.pastebin.com/m71027189
Thanks!
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20091028/57a09651/attachment.html
More information about the Mono-aspnet-list
mailing list