【问题标题】:ERROR: Unable to cast COM object of type 'MSScriptControl.ScriptControlClass' to interface type 'MSScriptControl.IScriptControl'错误:无法将“MSScriptControl.ScriptControlClass”类型的 COM 对象转换为接口类型“MSScriptControl.IScriptControl”
【发布时间】:2012-12-13 14:00:40
【问题描述】:

我正在开发一个旧的 vb 应用程序,当我使用这个时,我收到了以下错误:

document.all["ScoringMessageBox$MessageLabel"].innerHTML = "An error occurred while loading the score model.<br>SUCCESS: Set Model Language<br>FAILED: Set Model parameters<br>ERROR: Unable to cast COM object of type 'MSScriptControl.ScriptControlClass' to interface type 'MSScriptControl.IScriptControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{0E59F1D3-1FBE-11D0-8FF2-00A0D10038BC}' failed due to the following error: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).";
    var RedirectAfterClick = document.getElementById('RedirectAfterClick'); 

这是我已经尝试过的事情列表(谷歌搜索)但没有成功:

  • IIS 重置(使用 IIS 托管的网站)
  • 注册框架 1.4 && 2.0
  • 下载sct10en.exe并安装http://www.microsoft.com/en-us/download /details.aspx?id=1949(COM 组件)

  • 重新安装 IIS

  • 手动注册 COM 组件

拜托,你能帮帮我吗?

【问题讨论】:

  • 我公司正在使用 c# 应用程序和旧的 vb 应用程序,用于不想升级软件的最老客户(成本高)。
  • 当然,支持不想升级的客户会变得很昂贵。不要忘记向前冲,只要你让他们不这样做,他们就永远不会这样做。

标签: visual-studio iis com vb6


【解决方案1】:

您应该检查 32 位与 64 位的问题。脚本控件只是一个 32 位组件。如果您打算使用脚本控件,则不能让 IIS 以 64 位运行。

【讨论】:

  • 感谢您的回复,抱歉(我的错)客户端(不是我)使用的是 Windows Server 2003 32 位...我已经通过 web ex 与他检查了 iis 设置,我没有通知问题。
  • 它应该可以正常工作。您可以尝试一个简单的 .VBS,它只执行 CreateObject("MSScriptControl.ScriptControl") 并查看它是否有效。
  • 确实,我坚信这是唯一的解决方案。谢谢
猜你喜欢
  • 1970-01-01
  • 2018-06-20
  • 1970-01-01
  • 2020-05-13
  • 2018-08-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-05-24
相关资源
最近更新 更多