HRESULT:0x80040154(REGDB_E_CLASSNOTREG),错误,我的网站在蔚蓝的云上 [英] HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG), error, my website is on azure cloud

查看:96
本文介绍了HRESULT:0x80040154(REGDB_E_CLASSNOTREG),错误,我的网站在蔚蓝的云上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用来自网站URL的互操作性通过C#代码编写excel文件时,就会出现此错误.在本地计算机上运行良好.在将网站发布到Azure云基础服务器后运行.它不适用于网站网址.

This error is coming when i am writing excel file thru c# code using interop from website url. It is working perfectly fine on local machine. after running publish of my website to Azure Cloud base server. It is not working on website url.

如果我必须在Azure上安装MS Excel,该怎么做.

If i have to install MS Excel on Azure, how can i do that.

如果还有其他解决方法,请指导我.

If there is any other solution, please guide me.

推荐答案

E_CLASSNOTREG为类未注册".您可能正在使用Office Interop程序集,这需要安装适当版本的Office.

E_CLASSNOTREG is "Class not registered". You are likely using the Office Interop Assemblies, which require the appropriate version of Office to be installed.

如果我必须在Azure上安装MS Excel,该怎么做.

If i have to install MS Excel on Azure, how can i do that.

据我所知,您无法为Azure网站安装它们.您将需要使用Azure虚拟机来安装Office并获得适当的许可.从授权的角度来看,我不确定使用Office服务器端在技术上是否正确".

As far as I am aware, you cannot install them for Azure web sites. You would need to use an Azure Virtual Machine to install office and get appropriate licensing. I'm not sure either if it is technically "correct" to use Office server-side from a licensing perspective.

要考虑的另一种方法是使用 Open XML SDK 它不依赖于已安装的Excel,但可能更难以使用.还有许多其他的第三方库可供选择.

Another option to consider is using the Open XML SDK which does not rely on Excel being installed, but may be more difficult to use. There are many other 3rd party libraries to choose from as well.

这篇关于HRESULT:0x80040154(REGDB_E_CLASSNOTREG),错误,我的网站在蔚蓝的云上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆