Debug VB COM component in IIS7

If you Failed to debug VB component which is hosted in IIS process. Let me share my findings,

Process to reproduce,

1.Tap F5 in VB project to start debug and wait IIS process to invoke our VB component.

2.Set breakpoint at your interested line in VB IDE;

2.Invoke Web Service which will create and call the component

Result: nothing happened

Expection: The breakpoint is supposed to be hitted

Link to resolve this issue:

Well I finally got to the place where to give application-specific
permission. That's quite a process. I followed this guide,which was a help
link in the error message. Event log online help took me here
:http://www.microsoft.com/technet/sup...DCOM&LCID=4105
To assign permissions

1.. Using Regedit,navigate to the following registry value
HKCR/Clsid/clsid value/localserver32
The clsid value is the information displayed in the message.
2.. In the right pane,double-click Default. The Edit String dialog Box is
displayed. Leave this dialog Box open.
3.. Click Start,and then click Control Panel.
4.. Double-click Administrative Tools,and then double-click Component
Services.
5.. In the Component Services snap-in,expand Computers,expand My
Computer,and double-click DCOM Config.
6.. In the right pane,locate the program by using its friendly name(or clsid value in regedit).
7.. Right-click the program name,and then select Properties.
8.. On the Security tab,in the Launch and Activation Permissions group
Box,select Customize,and then click Edit.
Add the user(network service/IUser for IIS 7)to the permissions list,and give the user the appropriate
permissions.


iisreset or recycle associated application pool.

tap F5 in VB 6.0 IDE--> run you application->web service invoked->the break point is highlighted! Perfect!

Kindly note: Please follow up steps mentioned above again after each iisreset.

相关文章

Format[$] ( expr [ , fmt ] ) format 返回变体型 format$ 强...
VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办...
在项目中添加如下代码:新建窗口来显示异常信息。 Namespace...
转了这一篇文章,原来一直想用C#做k3的插件开发,vb没有C#用...
Sub 分列() ‘以空格为分隔符,连续空格只算1个。对所选...
  窗体代码 1 Private Sub Text1_OLEDragDrop(Data As Dat...