缺少office的组件
时间:2023-11-07 19:21:07
这个问题初步判断为服务器上面缺少office的组件。
我开发的环境安装了vs2005。vs2005安装完毕后,在GAC(路径为:C:\WINDOWS\assembly)中注册很多程序集。在C:\WINDOWS\assembly目录下面找到了Microsoft.Office.Tools.Excel 版本:8.0.0.0 公钥标识:b03f5f7f11d50a3a 与我的配置文件一致。(奇怪为什么配置文件中PublicKeyToken=“B03F5F7F11D50A3A"为大写,而C:\WINDOWS\assembly目录下面的公钥标识为小写呢?.net不是区分大小写吗?)
服务器上由于没有安装vs2005。而开发网站的时候“引用dll “ 的时候引用的是C:\WINDOWS\assembly下面的程序集。在服务器的C:\WINDOWS\assembly目录下面根本就不存在Microsoft.Office.Tools.Excel 所以运行网站的时候报错。
解决方案:
在服务器上面把程序需要引用的dll注册到GAC中。
具体方法:
1.先把需要的dll拷贝到服务器上面。把开发环境中的C:\Program Files\Common Files\Microsoft Shared\VSTO目录直接拷贝到服务器的C:\Program Files\Common Files\Microsoft Shared\目录下。
2.在服务器上 开始-程序-管理工具-Microsoft .NET Framework 2.0 配置-管理程序集缓存-将程序集添加到程序集缓存。选中那些dll即可。
运行网站。一切ok。
标签:office,office组件
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
至强e5cpu天梯图_至强e5cpu天梯图2020最新高清图
2023-07-09 23:27:31
![](https://img.aspxhome.com/file/2023/3/a301873_0s.jpg)
Windows 2008 R2 安装sp1补丁时未知错误(0x800f0818)的解决办法
2023-05-17 13:04:31
![](https://img.aspxhome.com/file/2023/29/a255312_0s.png)
iOS 13 照片编辑小技巧:拷贝照片与复制功能有什么区别?
2022-05-31 21:15:59
![](https://img.aspxhome.com/file/2023/4/a195304_0s.png)
Word2016直角引号怎么打? Word2016输入直角引号的教程
2023-09-11 02:45:44
![](https://img.aspxhome.com/file/2023/6/22806_0s.jpg)
win10屏幕分辨率调高了会黑屏?
2022-10-16 07:11:02
![](https://img.aspxhome.com/file/2023/2/a288499_0s.png)
excel表格日期怎样设置排序
2022-11-13 11:22:25
百度Hi怎么允许接收可执行文件?百度Hi电脑版允许接收可执行文件方法简述
2023-02-05 03:22:56
![](https://img.aspxhome.com/file/2023/7/a330165_0s.jpg)
Intel自曝Atom致命缺陷:服务器瘫痪断网
2023-04-19 00:46:05
![](https://img.aspxhome.com/file/2023/4/a305926_0s.jpg)
word页码如何从第三页开始
2023-02-17 16:22:22
![](https://img.aspxhome.com/file/2023/0/33660_0s.jpg)
excel 2003合并单元格的方法
2023-12-30 00:06:12
![](https://img.aspxhome.com/file/2023/3/a297077_0s.jpg)
elccest.exe是间谍广告程序吗 elccest进程有什么作用
2022-07-01 12:28:40
笔记本键盘没有numlock怎么办
2023-01-26 06:23:06
![](https://img.aspxhome.com/file/2023/1/a277083_0s.png)
win11系统用户账户控制总是弹出来的解决方法
2023-01-29 16:00:50
![](https://img.aspxhome.com/file/2023/1/a274589_0s.png)
excel中如何制作柏拉图
2023-08-09 18:05:58
![](https://img.aspxhome.com/file/2023/7/a142897_0s.jpg)
Win7系统怎样修复系统损坏文件?
2022-10-03 10:55:55
![](https://img.aspxhome.com/file/2023/3/a301016_0s.jpg)
excel表格排序操作的教程
2023-04-14 11:57:38
Word段落设置中的小技巧和快捷键
2022-07-31 17:36:40
Excel2013如何运用rept函数将数字图形化
2022-06-15 21:38:31
![](https://img.aspxhome.com/file/2023/2/38122_0s.png)
Win10手动设置固定IP地址的小技巧
2023-06-14 06:29:13
![](https://img.aspxhome.com/file/2023/26/a226972_0s.jpg)
佳能eos utility怎么用
2022-02-15 11:24:22
![](https://img.aspxhome.com/file/2023/7/a328576_0s.jpg)