从 ASP 实例化 VB6 COM 组件时 ProgId 无效
我们正在使用 Server.CreateObject 在 Windows 2000 Server 上从经典 ASP 实例化 VB6 COM 组件。我们收到“无效的 progid”错误消息。
DLL 已注册。事实上,我们可以运行一个使用 WSCRIPT 的 VBS 文件来实例化并运行该组件,以便显示它已注册。
为什么 ASP 无法实例化它?这个权限有关系吗?我们尝试过将 IUSR 和 IWAM 帐户放入管理员组(只是暂时的)之类的方法,但似乎没有帮助。我们已授予每个人访问包含 DLL 的文件夹的权限。
我们能够在另一台服务器上注册 DLL 并在那里运行相同的 ASP 页面,因此它确实可以工作。
还有一件事:服务器可能已被重命名一次(IUSR 帐户名称与计算机名称不同)。
任何帮助表示赞赏!
-克里普
We're instantiating a VB6 COM component from classic ASP on a Windows 2000 Server using Server.CreateObject. We get the 'invalid progid' error message.
The DLL is registered. In fact we can run a VBS file that uses WSCRIPT to instantiate and run the component so that shows it is registered.
Why is ASP failing to instantiate it? Is this permissions related? We've tried things like putting the IUSR and IWAM accounts in the Administrators group (just temporarily) and it didn't seem to help. We've granted Everyone access to the folder containing the DLL.
We were able to register the DLL on another server and run the same ASP page there so it does work.
Just one other thing: the server may have been renamed at one time (the IUSR account name differs from the machine name).
Any help appreciated!
-Krip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你还没有说涉及哪些操作系统,例如支持UAC的操作系统。你也没有说这个库是如何注册的。
您很可能尝试自行注册此东西(例如运行 regsvr32.exe),并且注册最终位于虚拟化位置。因此,它只会被同一用户上下文下运行的进程视为“注册”并受到虚拟化的影响(没有清单声明它支持 Vista)。
它也可以在用户的 HKCU 中“按用户”注册,但如果不采取特殊操作,这种情况通常不会发生。
即使是 PDW 包也可以解决这个问题,但安装程序 MSI 会更好。仅复制内容并在其上运行 regsvr32.exe 并不是正确的部署。
You haven't said what OSs are involved, for example those supporting UAC. You also haven't said how this library was registered.
It is very likely that you tried to self-register this thing (for example running regsvr32.exe) and the registration ended up in a virtualized location. Thus it will only be seen as "registered" by a process running under the same user context and subject to virtualization (no manifest declaring it Vista aware).
It could also be registered "per user" in the user's HKCU, but this normally doesn't happen without taking special action.
Even a PDW package would get around this, but an Installer MSI would be better. Just copying things around and running regsvr32.exe on them is not proper deployment.
启动 Procmon 并查看您的应用程序正在尝试访问哪个注册表项。然后转到该键并查看它指向的位置。
我认为您只是错误地拼写了 ASP 中的 ProgID 名称。
Start Procmon and see what registry key your app is trying to access. Then go to that key and see where it points.
I am thinking that you simply misspelled the name of the ProgID in your ASP.