I found myself laughing out loud as I got to the end of those instructions :) Clear as mud!
Tim McGee Phoenix Controls, Software Engineering Group mailto:[EMAIL PROTECTED] 978-795-3408 -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Ben Callister Sent: Wednesday, July 02, 2003 2:03 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] A complicated debug scenario Hi Seref: i recently had the same frustration as you debugging my ASP.NET web service and then on into my vb6 COM DLL. after much much frustration and research, i was actually willing to expire an MSDN incident to learn how to do this. so, i opened a case with MS and i learned that there is no way to do what you want, unless you follow the below AMAZINGLY complex steps (which are not supported - the engineer figured this out on his own). it was not worth it to me to endure them - i rather just moved the code i needed to debug into a WinForms application (which *will* work as you want from vb6), and debugged both worlds that way. one thing i dont understand is that MS actually told me that it was going from managed to unmanged code that caused the problem (in particular, having to go through interop), yet it works fine from other .NET project types, just not from ASP.NET. i dont see why there should be a difference there. and imo, since the migration from classic COM components (largely written in vb6) to .NET is going to take some time for most of us, they *should* figure out this debugging issue. nonethless, here are the steps they gave me. good luck! Here are steps to setup debug VB 6.0 dll inside VB 6.0 project through web service as client. 1. Backup the HKCR registry hive or the entire registry. 2. Set Isolation level to Low for virtual directory for you web service 3. In the Services MMC under Administrative tools menu, stop the 'IIS Admin Service' and change its startup Type from Automatic to Manual. Make sure aspnet_wp.exe is terminated. 4. In the Local Security Policy MMC under Administrative tools, select Security Settings | Local Policies | User Rights Assignment. Make sure you have your use rid added to the following permissions: - Log on as Service - Act as part of the operating system - Generate security audits 5. Open C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG\machine.config and search for <ProcessModel> tag. This is an xml file. Change the 'username' attribute to SYSTEM. For example <processModel enable="true" timeout="Infinite".... userName="SYSTEM" password="AutoGenerate" logLevel="Errors" .../> 6. Use the Distributed COM Configuration utility (DCOMCNFG) to change the identity of the IIS Admin Service to the interactive account. Select "IIS Admin Service" and click properties button. Click the identity tab and select 'the interactive user'. 7. Remove the .txt extension from debugASPX.vbx.txt (attachment) and run the script. Select Cancel when prompted - this will allow you to start inetinfo.exe under the logon user account. 8. Start IIS under logon user account by running this command from a DOS command prompt "<drive>:\WINNT\system32\inetsrv>inetinfo -e w3svc" without the quotes. You should see that inetinfo.exe is running under the logon user account from task manager. 9. Start VB6 and load project of interest. Place break points at locations of interest and press F5. 10. Start your .asmx page from localhost and try to access VB6 component. benjamin callister [EMAIL PROTECTED] -----Original Message----- From: Seref Arikan [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] A complicated debug scenario Hi, Currently i'm trying to implement a com interop project.My business logic is implemented in a vb com dll, which i access from asp.net via com interop Today, we had a serious problem and tried to debug the dll source. Even if i managed to debug the vb dll from inside vs.net, the debugger acted somewhat weird, and immediate window was not usefull for vb types and values (or i could not get it work right) Instead of trying to debug from vs.net, we tried to debug the dll source from vb 6, by starting the dll with run, in debug mode. After this, i've removed the original reference to vb dll, and added the reference to .vbp in vs.net. while vb is in debug mode. When i run the asp.net app, i get an access denied error, telling me asp.net can't access the required resource. I've tried everything from making asp.net user Admin (gasp :) to changing directories security permissions allowing access to everyone... But no matter what i tried, i could not get it to work. I've tried to use <identity impersonate =true/> and not allowing anonymous access to web site that hosts asp.net code. The same code snippet i've used can be used in a console app, and using same reference with asp.net project, the vb 6 debugger works perfect under these conditions.so i assume the problem is somewhat the identity of asp.net app. Unfortunately, i've failed so far.. Now, how can i debug the vb dll using vb6 , with an asp.net app, i hope i could express the problem clear enough. Any help would be appreciated a lot Best Regards, Seref Arikan
