"unable to attach to the process" - VS 2003 VB.NET dll and VB6

E

eric.goforth

Hello,

I'm calling a VB.NET 2003 dll that's registered in COM+. I've added a
reference to it in a VB6 DLL that I'm calling from a Classic ASP page.
Previously I was able to attach to my .NET dll and debug it. I haven't
been able to do this in a while and I'm thinking that it must be
because I've installed VS 2005 on my machine subsequently.

So in my C:\Program Files\Microsoft Visual Studio\VB98 directory I
added a file called vb6.exe.config that contains the following:

<configuration>

<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>

</configuration>

I also added an app.config file to my .NET dll's project that looks
like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>

So I'm running my VB6 dll in the IDE and I put a break point on the
line after the CreateObject line in VB6 dll code.

Dim objDotNet As MyDotNetDLL.clsMyDotNetClass
Set objDotNet = CreateObject("MyDotNetDLL.clsMyDotNetClass")
'Put a break point here...

I have my VB.NET dll project open in the IDE and I try to attach to the
process using Tools / Debug Processes.

I pick dllhost that has "Microsoft Active Server pages" beside it with
the Type Script, .NET, T-SQL, Win32. I then pick "Common Language
Runtime" as the program type that I want to debug and I still get the
"Unable to attach to process" message.

Thanks,
Eric
 
E

eric.goforth

Dr. Jochen Manns said:
Try

<requiredRuntime version="v1.1.4322" />

Regards

Jochen

Would that be instead of the <supportedRuntime version="v1.1.4322"/> or
in addition to it.

-Eric
 
E

eric.goforth

Dr. Jochen Manns said:
I use it instead but I think both ways should do it.

Regards

Jochen

So I put a <supportedRuntime version="v1.1.4322"/> in my vb6.exe.config
file that's in the C:\Program Files\Microsoft Visual Studio\VB98 and in
the app.config file that's in the same directory as my VB.NET dll
that's registered in COM+. Still no joy. So the VB.NET dll is in the
MyDLL\obj\Debug directory and in that directory I have:

..sbas
App.config
MyDLL.dll
MyDLL.pdb
MyDLL.tlb
temp
TempPE

My app.config file and vb6.exe.config files now look like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<requiredRuntime version="v1.1.4322" />
</startup>
</configuration>


-Eric
 
D

Dr. Jochen Manns

Well, you have to create the config file for the process you are goiung to
debug. As far as I understand this is NOT vb6.exe but DLLHOST.exe in the
System32 folder!

Jochen
 
E

eric.goforth

Hello,

Dr. Jochen Manns said:
Well, you have to create the config file for the process you are goiung to
debug. As far as I understand this is NOT vb6.exe but DLLHOST.exe in the
System32 folder!

Jochen

So I now have a dllhost.exe.config file and an app.config file that now
look like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<requiredRuntime version="v1.1.4322" />
</startup>
</configuration>

I'm able to step into my .NET DLL. The way it gets called is my .NET
dll is registered in COM+ (creating a tlb file). I'm then running a
classic ASP application that call a vb6 dll (also registered in COM+).
My vb6 dll then calls my .NET dll which calls a web service. I pass
in the url to the web service as a parameter to my .NET dll, I'm
currently passing in a url that points to a test harness web service
that also sits on my local machine. When I call the web service it
runs correctly, but I'm not able to step into the code for my web
service.

The test web service is in a .NET solution together with my .NET dll
that's the link between the web service and my vb6 dll. When I look at
the break points in my web service they all have a "?" beside them
saying the "The breakpoint will not currently hit. No symbols are
loaded for the document." I've done a rebuild all on my solution with
the solution configuration set to "Debug." The datestamp for the pdb
file for the web service matches the .dll.

The web service is in C# while the calling dll is in VB.NET, but these
2 projects are in the same solution.

-Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top