I'm generating a custom Word documents in my web application using the .mhtml format. Previously this was working fine. I assemble the document and write it to a directory then give a link to the file (with a .doc extension). Recently my template has changed to include embedded images. Now when I attempt to save and open a file from the web app, Word refuses to open it. It just shows a message "Cannot open file .." with the path. When you view the help it says something about lack of memory which is bogus.
When I open the exact same file from my localhost server it works fine. The two files (local and production) are identical. I've tried adding the site as a Trusted Site - no luck.
开发者_开发技巧Any ideas? Jeff
Sounds like the webserver does not annotate with a correct mimetype.
Is the downloaded file identical with the one present in the webserver? Do a byte-wise comparison.
Also try other browsers to see. IE has some quirks.
Solved issue by switching to plain HTML format with images as external links.
精彩评论