现在的位置: 首页 > 综合 > 正文

Debug VB COM component in IIS7

2014年06月14日 ⁄ 综合 ⁄ 共 1560字 ⁄ 字号 评论关闭

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.

抱歉!评论已关闭.