- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试使用 Microsoft.Office.Interop.Excel.Workbook
类在服务器端将 .xls 文件转换为 .xlsx 文件,如下所示:
workBook.SaveAs("FILENAME_HERE", XlFileFormat.xlOpenXMLWorkbook, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlNoChange, Microsoft.Office.Interop.Excel.XlSaveConflictResolution.xlLocalSessionChanges, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
我收到以下错误:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)). : System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at CALLING_METHOD_IN_MY_LIBRARY_HERE...
问题是此错误仅发生在登台服务器上;在我的本地机器上它工作正常。
我在登台服务器上尝试过的事情:
2) 展开“组件服务”->“计算机”->“我的电脑”->“DCOM 配置”
3) 找到“Microsoft Excel 应用程序”。
4)右键打开属性对话框
5) 单击“安全”选项卡,
6) “启动和激活权限,配置权限,已添加权限 - 在管理员用户(此用户)、交互式用户和启动用户下运行的身份
7)。启动和激活权限+访问权限+配置权限=>添加IIS_IUSRS+完全控制的网络服务**
2.更改了在我的本地计算机上将 .xls 文件从“任何 CPU”转换为“x86”的项目的构建,并将此库发布到服务器上。
有人知道如何解决这个问题吗?我已经努力解决这个问题 2 天了。
最佳答案
使用 DCOMCNFG.exe。打开它并转到:组件服务 -> 计算机 -> 我的电脑 -> DCOM 配置 -> Microsoft Excel 应用程序。
打开属性,选择“身份”选项卡,然后选择交互式用户。
关于c# - 服务器执行失败(HRESULT : 0x80080005 (CO_E_SERVER_EXEC_FAILURE)) 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22062284/
有人可以帮我解码这个 HResult 吗?这是什么意思?我知道消极代表着失败。剩下的 10 位怎么样? 我引用了MSDN HResult文章here ,但我不确定如何确定我的设施和代码位是什么。 更多
假设我有一个设计得不太好的 COM 接口(interface),并且某些类在逻辑上无法实现它的方法之一。 例如,有一些方法,如 Explode()许多类只是不能合理地“爆炸”,但仍然必须实现该方法并需
嗨,我设计了一个控制台应用程序来测试我的 C++ 项目(.Net Framework 3.5)。我为此应用程序创建了一个设置并将其安装在虚拟机上以进行测试。但是每当我在虚拟机上运行这个已安装的应用程序
是否有解释错误代码的列表。 Eks:HRESULT:0x81070215 没有告诉我什么时候出错了? 最佳答案 WinError.h 我的机器上有以下路径,你的也类似: C:\Program File
我正在开发一个供 Microsoft .NET 和 COM 组件使用的 Microsoft .NET 程序集。我正在编写托管代码,并且必须指出何时为类中的方法指定了不正确的参数。当出现参数异常时,我需
我在 IUnknown 派生的 COM 接口(interface)中有一个函数: HRESULT GetPassword( [in] long bufferLength, [out] WCHAR* b
类似问题was asked before ,但我还没有在那里找到一些答案。 据我所知,为了制作自定义 HRESULT 代码,我创建了一个 .mc 文件,我在其中描述代码,然后编译它并获得一个 .h 文
我已经有一个使用大量 COM 和 HRESULTS 的项目。无论如何,我想知道是否可以定义自己的 HRESULT,并且能够将 FormatMessage() 用于我们自己的 HRESULT? 我翻遍了
我发现有时在 IO 操作中常见 IOException被抛出。我可以使用 Marshal.GetHRForException(Exception e)方法(找到 here )以确定具体的错误代码。之后
感谢任何帮助: 我正在 VS2010 中开发一个与 Excel 交互的 C#.Net 应用程序。该应用程序在我的本地计算机上正常运行。但是,上传到远程 Windows 2003 服务器会破坏应用程序。
我在使用 Windows.Media.Capture 命名空间中的 MediaCapture 对象时收到此异常消息 Exception from HRESULT: 0xC00D36B4。当我尝试使用
十进制:143196173 十六进制:0x889000D 调用 IAudioSessionControl2->GetProcessId() 的结果. GetLastError = 126* Messa
我只是花了 way 太长时间试图诊断为什么在下面的代码片段中,ProcessEvent() 方法似乎忽略了 false 我为 aInvokeEventHandler 传入的值: HRESULT CEv
以下 EndDraw() 函数返回 HRESULT 错误代码: http://msdn.microsoft.com/en-us/library/windows/desktop/dd371924%28v
我需要将 HRESULT 值作为命令行参数传递给程序。我本来打算通过传递十六进制值来做到这一点,例如: >receiver.exe 0x80048836 我正在尝试使用 wcstol 将此字符串表示形
我希望能够执行与 FormatMessage 等效的操作 - 生成用于调试甚至运行时构建的文本消息,可以报告一些常见的 HRESULT,甚至吐出诸如严重性、它的功能等信息是,可能还有错误代码的描述。
为什么在定义错误/HRESULT 处理/日志记录时会选择或不选择使用宏? 我正在处理一个通过接口(interface)调用的错误处理类,因此我可以使用 Boost 共享指针在我需要的时间和地点调用该类
这个问题在这里已经有了答案: Is there a way to get the string representation of HRESULT value using win API? (4 个
我在 Windows Vista 上使用 .NET Framework 6.0 版。我最近安装了一个显示图表的程序。当我打开它时,我收到一条来自 Microsoft .NET 框架的错误消息: Cla
我想测试下面的代码: private bool TestException(Exception ex) { if ((Marshal.GetHRForException(ex) & 0xFFF
我是一名优秀的程序员,十分优秀!