2003 服务器下asp.net生成word 不配置权限如何弄
2003 服务器下asp.net生成word 不配置权限怎么弄?
asp.net 常用的生成word功能,代码也是网上常见的,自己本地反复测试过没问题。
serves 2003下运行下出现问题,在本地就行,本地也是sever2003的系统,组件权限已配置
网上常见的模版生成法:
Document MyDoc = wordApp.Documents.Add(ref tempName, ref missing, ref missing, ref missing);
到这里时出错,显示Word出现问题.
html生成word,在加载html文件时出错(Word.Selection.InsertFile):
System.Runtime.InteropServices.COMException (0x800A1499): 文档名或其路径无效。 (D:\web\temp\63384007.html)
在 Microsoft.Office.Interop.Word.Selection.InsertFile(String FileName, Object& Range, Object& ConfirmConversions, Object& Link, Object& Attachment)
文件存在,目录权限也有。
保存word文档时也出错(Word.DocumentClass.SaveAs):
System.Runtime.InteropServices.COMException (0x800A1066): 命令失败
在 Microsoft.Office.Interop.Word.DocumentClass.SaveAs(Object& FileName, Object& FileFormat, Object& LockComments, Object& Password, Object& AddToRecentFiles, Object& WritePassword, Object& ReadOnlyRecommended, Object& EmbedTrueTypeFonts, Object& SaveNativePictureFormat, Object& SaveFormsData, Object& SaveAsAOCELetter, Object& Encoding, Object& InsertLineBreaks, Object& AllowSubstitutions, Object& LineEnding, Object& AddBiDiMarks)
word已经正常安装,组件也应该被程序正常加载,代码没问题,网站是用asp.net2.0开发的,其它功能都没问题,可是就是导出word出错,应该是win2008设置的问题,可实在找不出是什么原因?????
------解决方案--------------------
我认为尽量不要使用这种跟系统环境关联度很大的组件,一旦环境稍有不同,就会影响到系统的正常使用。http://www.360doc.com/content/13/0722/08/5054188_301650589.shtml
------解决方案--------------------
http://bbs.****.net/topics/320017947
------解决方案--------------------
asp.net不要用来做稍微多一点的Office二次开发。如果要调用Office的COM,你应该写成windows service。
------解决方案--------------------
asp.net生成、打开word的神器是PageOffice,这个是专业的第三方组件,服务器端不用安装office,不用自动化调用,不需要任何特殊配置,不仅可以动态输出任何你要的内容到word文档里,还可以在网页里在线显示、编辑word、excel。你不用担心浏览器兼容问题,PageOffice支持IE、chrome、firefox、搜狗、遨游、360等所有流行的浏览器
asp.net 常用的生成word功能,代码也是网上常见的,自己本地反复测试过没问题。
serves 2003下运行下出现问题,在本地就行,本地也是sever2003的系统,组件权限已配置
网上常见的模版生成法:
Document MyDoc = wordApp.Documents.Add(ref tempName, ref missing, ref missing, ref missing);
到这里时出错,显示Word出现问题.
html生成word,在加载html文件时出错(Word.Selection.InsertFile):
System.Runtime.InteropServices.COMException (0x800A1499): 文档名或其路径无效。 (D:\web\temp\63384007.html)
在 Microsoft.Office.Interop.Word.Selection.InsertFile(String FileName, Object& Range, Object& ConfirmConversions, Object& Link, Object& Attachment)
文件存在,目录权限也有。
保存word文档时也出错(Word.DocumentClass.SaveAs):
System.Runtime.InteropServices.COMException (0x800A1066): 命令失败
在 Microsoft.Office.Interop.Word.DocumentClass.SaveAs(Object& FileName, Object& FileFormat, Object& LockComments, Object& Password, Object& AddToRecentFiles, Object& WritePassword, Object& ReadOnlyRecommended, Object& EmbedTrueTypeFonts, Object& SaveNativePictureFormat, Object& SaveFormsData, Object& SaveAsAOCELetter, Object& Encoding, Object& InsertLineBreaks, Object& AllowSubstitutions, Object& LineEnding, Object& AddBiDiMarks)
word已经正常安装,组件也应该被程序正常加载,代码没问题,网站是用asp.net2.0开发的,其它功能都没问题,可是就是导出word出错,应该是win2008设置的问题,可实在找不出是什么原因?????
asp.net生成word
------解决方案--------------------
我认为尽量不要使用这种跟系统环境关联度很大的组件,一旦环境稍有不同,就会影响到系统的正常使用。http://www.360doc.com/content/13/0722/08/5054188_301650589.shtml
------解决方案--------------------
http://bbs.****.net/topics/320017947
------解决方案--------------------
asp.net不要用来做稍微多一点的Office二次开发。如果要调用Office的COM,你应该写成windows service。
------解决方案--------------------
asp.net生成、打开word的神器是PageOffice,这个是专业的第三方组件,服务器端不用安装office,不用自动化调用,不需要任何特殊配置,不仅可以动态输出任何你要的内容到word文档里,还可以在网页里在线显示、编辑word、excel。你不用担心浏览器兼容问题,PageOffice支持IE、chrome、firefox、搜狗、遨游、360等所有流行的浏览器