Hi Kevin,
Thanks for posting in the community.
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to know how to debug a
serviced component.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
I think you may need to set a break point on the code of the function to be
called.
e.g.
SolutionA has two projects(SC1(Serviced Component), TestSC(Console
Application))
[SC1]
Imports System.EnterpriseServices
Imports System.Runtime.CompilerServices
Imports System.Reflection
Imports System.Runtime.InteropServices
' Supply the COM+ application name.
<Assembly: ApplicationName("TestApp")>
' Supply a strong-named assembly.
<Assembly: AssemblyKeyFileAttribute("..\..\Test.snk")>
Namespace BankComponent
Public Interface IAccount
Function Post(ByVal x As Integer) As Integer
End Interface
<ClassInterface(ClassInterfaceType.None)> _
Public Class Account
Inherits ServicedComponent
Implements IAccount
Public Function Post(ByVal x As Integer) As Integer Implements
IAccount.Post
Return x * x ' Set Break Point at the line
' Updates the database; no need to call SetComplete.
' Calls SetComplete automatically if no exception is generated.
End Function
End Class
End Namespace
[TestSC]
Module Module1
Sub Main()
Dim o As SC1.BankComponent.IAccount = New SC1.BankComponent.Account
Dim i As Integer = o.Post(10) 'Set Break Point on the line
Console.WriteLine(i)
End Sub
End Module
Press F5 the application will run TestSC and hit the break point at the
line
Dim i As Integer = o.Post(10) 'Set Break Point on the line
Press F11 or F5 the IDE will navigate to Class1.vb(SC1) and hit the break
point at the link below.
Return x * x ' Set Break Point at the line
Please apply my suggestion above and let me know if it helps resolve your
problem.
BTW, for server activated COM+ component, you may need to attach the
dllhost.exe who host the com+ object.
http://groups.google.com/groups?hl=...=%22david+yuan%22+serviced+component&sa=N&tab
%3Dwg%26lr%3D
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.