Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems debugging transactional components

Status
Not open for further replies.

BigLar

Programmer
May 15, 2000
17
0
0
US
I cannot get interactive debugging to work properly and would appreciate any help you can offer.

I complile the ActiveX DLL in Project compatibility mode, then use the MTS console to stop the MTS processes, delete the components that form the package, and re-drop the DLL into the package components window. I then switch to the project Binary mode and press F5 to run it in debug mode. A window pops-up explaining that MTS features will not be available, saying something about needing service pack 4 for NT (I have service pack 6a). I choose to proceed then start a standard project that is my test client. I can step into the called DLL, walk through the source as it executes, and do ths standard debugging things, but I find that I have to replace "CreateInstance" calls with CreateObject calls typed into the immediately window and that I need to skip over any method calls to the context object.

I understand why I need to avoid the MTS context object calls (I am calling the instance of the DLL that is in memory and not the copy that is registered to MTS), but am wondering whether I can do something different or apply a patch that will enable the context object during interactive debugging.

I cannot seem to find any helpful information about this problem. Some high-profile MTS consultants we have turned to told us we should have this problem and suggested we re-apply sp6, but this did not solve the problem.

Any advice?


Larry
Larryh@ecn.ab.ca

 
Hi,
Depending the runtime you must debug the component.
If you run under VC++, you must attach to IIS process.
If you run under ASP-Runtime you must debug ALL lines.
If you run under VB runtime, VB simulate MTS.

 
Larry,

If you are compiling components on the same machine where MTS is running you need to do the registration twice , i.e delete component from the pacakge and add again , because VB automatically registers DLL when you compile which is different than what MTS is required, it changes couple of entries for that component when register to run under MTS.

You need not have to change the CreateInstance with CreateObject, all you need to do is add one registry enrty HKEYCLASSES_ROOT\Software\Microsoft\Transaction Server \RunWithoutContext,
this should do the job , I strongly recomend that you should get the correct entry name from MSDN online , try searching for debugging component under MTS .

 
SoapXlm0,

Thanks for the reply.

Why do you tell me to "do the registration twice, i.e delete component from the pacakge and add again"?

How does this differ from what I do now? I compile the DLL with Project compatibility selected, then delete the components from MTS and re-drop the DLL to add them again. Then I run the still=open VB project with Binary compatibility selected.

The problem with the registry key is that it disables MTS services, so calls to objContext.IsInTransaction and the like will raise errors, and there is no transaction control.

Larry

Larry
Larryh@ecn.ab.ca

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top