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?
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.
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.
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.
--------
Dear all,
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!
fyale
Member
20 Points
4 Posts
Debug C++ DLL running in ASP .Net app
Feb 14, 2006 03:15 PM|LINK
Hello,
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,
Fred
Mikhail Arkh...
All-Star
33139 Points
6083 Posts
Microsoft
Re: Debug C++ DLL running in ASP .Net app
Feb 14, 2006 08:03 PM|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.
------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
fyale
Member
20 Points
4 Posts
Re: Debug C++ DLL running in ASP .Net app
Feb 14, 2006 09:46 PM|LINK
Hi Mikhail,
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.
Fred
Li_Zhang
Member
4 Points
10 Posts
Re: Debug C++ DLL running in ASP .Net app
Apr 25, 2007 07:45 AM|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.
--------
Dear all,
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!
Best Regards,
Li from Beijing