我正在尝试使用microsoft.office.interop.excel创建xlsx文件。
当我在VS中使用IIS express运行Web应用程序时,它可以完美地工作,但是当我在本地IIS中使用VS运行时,我会收到以下错误:
{"Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))."}
我在我的服务器上也遇到了同样的异常,服务器版本:windows server 2016, IIS版本:10.0.14393.0
注意:DCOMC配置包含Microsoft Excel Application。