问题描述
我需要能够在Windows 7 64位上调试Visual Basic 6 IIS应用程序。不仅仅针对单个问题而且针对持续开发。
I have a need to be able to debug a Visual Basic 6 IIS Application on Windows 7 64-bit. Not just for a single problem but for continuing development.
尝试调试会导致WebClass运行时出现错误发生了未指定的错误。
An attempt to debug results in an error "An unspecified error has occurred" from the WebClass runtime.
如果我不调试并只是访问已编译的webclass,页面加载就好了。因此,我不认为应用程序的注册/配置有任何问题,但这与Windows操作系统安全性有某种关联,阻止VB6 IDE挂钩到IIS并允许它进行调试。
If I do not debug and simply access the compiled webclass the page loads just fine. Therefore, I don't believe there is anything wrong with the registration / configuration of the application but rather this is somehow related to Windows OS security blocking the VB6 IDE from hooking into IIS and allowing it to debug.
以下是我尝试的所有内容:
Here are all of the things that I have tried:
- 禁用用户帐户控制(UAC)并重新启动。
- 为机器调试管理器(MDM)修改了DCOM组件安全性,并为其指定了Everyone启动和激活权限。
- 为手动添加DCOM条目 70F214BA-94E2-4bdf-8F30-32CB4A905E4D这是VB6 IDE并指定Everyone启动并激活权限。
- 已禁用Windows防火墙
- 以Windows XP SP3的兼容模式运行应用程序(VB6.exe)并以管理员身份运行。
- 创建一个新的IIS应用程序池,其标识设置为管理员帐户。将应用程序管道模式设置为经典和启用的32位遗留应用程序支持。
- Disabled User Account Control (UAC) and rebooted.
- Modified DCOM component security for machine debug manager (MDM) and assigned "Everyone" launch and activate permissions.
- Manually added DCOM entry for "70F214BA-94E2-4bdf-8F30-32CB4A905E4D" which is the VB6 IDE and assigned "Everyone" launch and activate permissions.
- Disabled Windows Firewall
- Ran the application (VB6.exe) in compatibility mode of Windows XP SP3 with run as administrator option.
- Created a new IIS application pool with an identity set to an administrator account. Set the application pipeline mode to classic and enabled 32-bit legacy application support.
这耗尽了我尝试的丰富经验。如果我创建一个VB6 Windows应用程序或ActiveX控件,我可以轻松启动和调试。
This exhausted my extensive experience of things to try. If I create a VB6 Windows Application or ActiveX control I can easily launch and debug.
我在Windows Server 2003上遇到了一个非常类似的问题,尽管全新安装了W2K3解决了这个问题。
I've experienced a very similar problem on Windows Server 2003 although a fresh install of W2K3 resolved the problem.
在Windows系统事件查看器日志中,事件ID 10004有两个重复的条目,如下所示:
In the Windows System event viewer log there are 2 duplicate entries for Event ID 10004 as follows:
DCOM收到错误1326并且无法登录DOMAIN \ User以运行服务器:
{70F214BA-94E2-4BDF-8F30-32CB4A905E4D}
DCOM got error "1326" and was unable to logon DOMAIN\User in order to run the server:{70F214BA-94E2-4BDF-8F30-32CB4A905E4D}
其中DOMAIN\User是我的域帐户,上面提到的GUID是我为VB ASP调试添加的DCOM条目。
Where DOMAIN\User is my domain account and the GUID mentioned above is the DCOM entry I added for VB ASP Debugging.
唯一的额外信息我必须提供的是Windows 7 64位在VM中运行,尽管我在尝试调试时远程控制台。我在没有控制台连接的情况下在VM上调试时遇到了问题。
The only extra information I have to offer is that Windows 7 64-bit is running in a VM although I am remoted to the console while attempting to debug. I've experienced problems debugging on VMs without a console connection.
如果有人可以提供任何进一步的建议,我会非常感激。
If anyone can offer any further suggestions of things to try I would greatly appreciate it.
如果有人能够解决这个问题并在Windows 7操作系统上成功调试IIS Web应用程序,描述必要的设置,我将提供300点的当前赏金!
If anyone can figure this out and succesfully debug an IIS web application on a Windows 7 OS depicting the necessary settings I will offer the current bounty of 300 points!
推荐答案
我认为无法在IDE中调试VB6 IIS应用程序
任何比Windows XP更新的Windows版本(可能与Windows的服务器风格类似)。问题的根本原因似乎是IIS 6和IIS 7+之间的主要差异。当然,没有关于该主题的官方文档,因此我将在下面详细介绍。
I believe it is not possible to debug a VB6 IIS Application
in IDE on any version of Windows newer than Windows XP (probably, situation is similar for server flavor of Windows). The root cause of the problem seems to be major differences between IIS 6 and IIS 7+. Of course, there is no official documentation on the topic, thus I shall go into more details below.
首先,回顾问题是有意义的。许多优秀人员似乎忘记了 IIS应用程序
是指在此上下文中特殊类型的VB6项目的确切术语。我能够在Win7 Ultimate x64 SP1,Win7 Ultimate x86 SP1和Vista Enterprise x86 SP2上重现这些步骤后的错误:
First, it makes sense to recap the problem. Many good folks seem to forget that IIS Application
is an exact term referring to special type of VB6 project in this context. I was able to reproduce the error following these steps on Win7 Ultimate x64 SP1, Win7 Ultimate x86 SP1, and Vista Enterprise x86 SP2:
- 安装VB6和SP6。
- 创建新的
IIS应用程序
项目:
- 保存项目。
- 选择运行 - >开始(F5)以调试项目。
- 选择Debugging选项卡上的任何选项,然后按OK:
- Install VB6 and SP6.
- Create new
IIS Application
project: - Save the project.
- Choose Run -> Start (F5) to debug the project.
- Choose any option on Debugging tab and press OK:
之后立即出现错误消息VB6 IDE:
Immediately after that there is error message in VB6 IDE:
让我们来看看在Windows XP上执行相同场景时会发生什么。当一个人开始调试VB6 IIS应用程序
:
Let us examine what happens when the same scenario is executed on Windows XP. When one starts debugging VB6 IIS Application
:
- 如果VB6 IDE启动IIS服务未运行:
- VB6 IDE提示选择IIS虚拟目录:
所有这些都发生在Windows XP 之前 WebClass
已激活。进程无法在Windows 7上进入此阶段。
All this happen on Windows XP before WebClass
is activated. Process doesn't get to this stage on Windows 7.
很明显,VB6 IDE尝试在IIS中执行某些管理任务,以便能够调试网页类
。借助和 API监视器。很明显,VB6.exe依赖于IIS Admin Service的COM接口。坏消息是,与以前的版本不同,IIS 7+不使用Metabase,IIS 7+中没有IIS Admin Service。可以安装 IIS Metabase和IIS6兼容性
组件,理论上应该启用使用Metabase继续使用IIS 7 +的应用程序:
It is clear that VB6 IDE attempts to perform some administrative tasks in IIS in order to be able to debug a WebClass
. One can delve a bit deeper with help of Process Monitor and API Monitor. It is clear then that VB6.exe relies on COM interfaces of IIS Admin Service. Bad news is that IIS 7+, unlike previous versions, doesn't use Metabase and there is no IIS Admin Service in IIS 7+. One can install IIS Metabase and IIS6 compatibility
component that, in theory, should enable applications that use Metabase to continue working with IIS 7+:
不幸的是,安装它并不能解决问题。
Unfortunately, installing it doesn't resolve the problem.
有人建议您的问题可能是由COM组件的启动和激活权限不足引起的。我担心所有这些建议都是徒劳的。这种错误总是伴随着系统事件日志中的相关错误事件。在这种情况下没有这样的事件。
There are suggestions that your problem can be caused by inadequate launch and activation permissions for COM components. I am afraid that all those suggestions are futile. Errors of that kind are always accompanied by related error events in System event log. There are no such events in this case.
这篇关于如何在Windows 7 64位上调试VB6 IIS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!