经典 ASP:不支持 Server.CreateObject
当我从经典 ASP 页面调用 Server.CreateObject() 时,我发现
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method
我已经尝试了以下操作(分别):
Server.CreateObject("Microsoft.XMLHTTP")
Server.CreateObject("MSXML2.XMLHTTP")
Server.CreateObject("MSXML.DOMDocument")
我知道 ActiveX 对象已安装,因为以下 javascript 调用有效
var test = new ActiveXObject("Microsoft.XMLHTTP");
var test = new ActiveXObject("MSXML2.XMLHTTP");
var test = new ActiveXObject("MSXML.DOMDocument");
我正在从本地主机 IIS 服务器调用它。 有什么想法如何解决这个问题吗?
When I call Server.CreateObject(), from my Classic ASP page, I get
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method
I've tried the following (separately):
Server.CreateObject("Microsoft.XMLHTTP")
Server.CreateObject("MSXML2.XMLHTTP")
Server.CreateObject("MSXML.DOMDocument")
I know the ActiveX objects are installed because the following javascript calls work
var test = new ActiveXObject("Microsoft.XMLHTTP");
var test = new ActiveXObject("MSXML2.XMLHTTP");
var test = new ActiveXObject("MSXML.DOMDocument");
I'm calling it from my localhost IIS server. Any ideas how to troubleshoot this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果执行以下操作:
...VBScript 创建对象,然后尝试访问存储在“x”中的默认属性。 由于这些对象都没有定义默认属性(特别是带有 [id(DISPID_VALUE)] 的基于 IDispatch 的属性),因此失败并显示“对象不支持此属性或方法”。
你真正想要的是这样的:
If you do the following:
...VBScript creates the object and then attempts to access the default property for storing in 'x'. Since none of these objects have a default property defined (specifically an IDispatch-based property with [id(DISPID_VALUE)]), this fails with "Object doesn't support this property or method".
What you actually want is this:
这个怎么样?
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
或者下载此组件并安装在您的网络服务器上?
http://www.microsoft.com/downloads/details.aspx microsoft.com/downloads/details.aspx?FamilyId=3144B72B-B4F2-46DA-B4B6-C5D7485F2B42&displaylang=en
然后重新启动服务器并重试。
How about this one?
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
Or downloading this component and installing on your webserver?
http://www.microsoft.com/downloads/details.aspx?FamilyId=3144B72B-B4F2-46DA-B4B6-C5D7485F2B42&displaylang=en
Then restarting the server and trying again.
从浏览器调用它们并不意味着它们安装在 IIS 中。
Calling them from the browser doesn't mean that they are installed in IIS.