vba ASP.NET 无法在 64 位 Windows Server 2008 R2 上创建 ActiveX 组件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10700178/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ASP.NET Cannot create ActiveX component on 64bit Windows server 2008 R2
提问by Kirtiraj
I am having a website in which users upload xslm (excel) files and in turn a macro is run in these files at the server. I unable to get this done; when I deploy it on IIS 7.5 (Win Server 2008 R2) an exception is generated
我有一个网站,用户可以在其中上传 xslm (excel) 文件,然后在服务器上的这些文件中运行宏。我无法完成这项工作;当我在 IIS 7.5 (Win Server 2008 R2) 上部署它时,会生成一个异常
System.Exception: Cannot create ActiveX component
System.Exception:无法创建 ActiveX 组件
I checked windows log, it says:
我检查了 Windows 日志,它说:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {00024500-0000-0000-C000-000000000046} and APPID Unavailable to the user IIS APPPOOL\DefaultAppPool SID (S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.
计算机默认权限设置不会为具有 CLSID {00024500-0000-0000-C000-000000000046} 和 APPID 的 COM 服务器应用程序授予本地激活权限,用户不可用 IIS APPPOOL\DefaultAppPool SID (S-1-5-82- 3006700770-424185619-1745488364-794895919-4004696415)来自地址LocalHost(使用LRPC)。可以使用组件服务管理工具修改此安全权限。
I checked steps listed on ASP.NET Cannot create ActiveX component, however it is not useful to me as there is no component (Microsoft Excel Application) in the hierarchy:
我检查了ASP.NET 上列出的步骤无法创建 ActiveX 组件,但是它对我没有用,因为层次结构中没有组件(Microsoft Excel 应用程序):
Component Services -> Computers -> My Computer -> DCOM Config -> Microsoft Excel Application
组件服务 -> 计算机 -> 我的电脑 -> DCOM 配置 -> Microsoft Excel 应用程序
Please help
请帮忙
回答by Deep Patel
- You need to grant permissions to Excel from DCOM
- Check the version(as in 32bit & 64bit) of Office on your computer.
- On 64 bit system with 32 bit Office try this: start -> run -> mmc -32 File -> Add/Remove Snap in
- 您需要从 DCOM 向 Excel 授予权限
- 检查计算机上的 Office 版本(如 32 位和 64 位)。
- 在 32 位 Office 的 64 位系统上试试这个:开始 -> 运行 -> mmc -32 文件 -> 添加/删除管理单元
Component Services -> Add. Then press "OK"
组件服务 -> 添加。然后按“确定”
Console Root>Component Services>Computers>My Computer>DCOM Config>Microsoft Excel Application (shud be present!) ... grant the permissions and try...
控制台根>组件服务>计算机>我的电脑>DCOM配置>Microsoft Excel应用程序(应该存在!)...授予权限并尝试...
Hope this helps.
希望这可以帮助。
回答by tobias
Start Run mmc -32 File Add Remove Snap-in Component Services Add OK Console Root Component Services Computers My Computer DCOM Config Microsoft Excel Application
Start Run mmc -32 File Add Remove Snap-in Component Services Add OK Console Root Component Services Computers My Computer DCOM Config Microsoft Excel Application