Last post Apr 25, 2007 03:45 AM by Li_Zhang
Feb 14, 2006 11:15 AM|fyale|LINK
I have written an ASP .Net application that calls methods in a C++ DLL developed in Visual Studio 6.0. The DLL itself is located within the bin directory of the .Net app during normal execution.
I would like to debug a method within the DLL. Typically, I would do this by specifying the exectuable for the debug session from within VS6 and initiating the program from there. However, in this situation that doesn't work.
Is there a way to do this? And, is there a more appropriate forum category in which this question might be asked?
Any help appreciated,
Feb 14, 2006 04:03 PM|Mikhail Arkhipov (MSFT)|LINK
You don't have to use VS6. You can use VS 2003 or VS 2005 which support mixed debugging and stepping through interop. Right-click on the Web site node in the solution explorer, choose Properties and then Start Options. Check 'Native code' in addition to
the ASP.NET debugger. This way you should be able to step into the C++ code directly from ASP.NET code.
Question: why you are not using VS 2003/2005 C++? You can add C++ project to the same solution as the Web site and consume C++ project outputs in the Web site bin folder.
Feb 14, 2006 05:46 PM|fyale|LINK
Thanks very much for your reply. I am new to ASP .Net, and originally posted this question in the category, "Getting Started". I guess the moderator felt this was a more appropriate category.
I will follow your instructions regarding the interop method. The reason I am not using the method you outline is twofold: one, the dll existed previously and I "discovered" that adding the unmanaged code would allow me to access the methods from a class
module within the app; and two, I was unaware that I could add the project to the Web solution. I will also experiment with that.
Again, thanks very much for your time. This will be a big help.
Apr 25, 2007 03:45 AM|Li_Zhang|LINK
Hi, I am facing the same problem, of debugging or step into a C++ DLL in a ASP.NET solution.
I added the C++ DLL source code as a project in that ASP.net solution, but it just can not be stepped into.
Also, I can only find a "ASP.NET" debugger option in Start Options, there is no choice as "Native Code".
I am working on this for several days and tried to seek help from different people. But without any results.
Could you please help me on this, Thanks Very Much!
Li from Beijing