HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG), error, my website is on azure cloud

陌路散爱 提交于 2019-12-12 00:50:34

问题


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.

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

and

If there is any other solution, please guide me.


回答1:


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

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

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.

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.



来源:https://stackoverflow.com/questions/50935980/hresult-0x80040154-regdb-e-classnotreg-error-my-website-is-on-azure-cloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!