I have the following problem. I have some project written in Visual Basic (not Visual Basic .NET but simple Visual Basic - sic!). I can compile it and generate a dll. Then inside my web application I add reference to this dll library. When I run my web application hosted in default Visual Studio server, everything is fine and I can debug my Visual Basic project. However, when I host my web application in IIS then I can't. Code does not stop in my breakpoint. My asp.net catch the exception when I try to execute some method from the mentioned library which is something like:
Unable to cast COM object of type 'xxx' to interface type 'yyy'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{4C2875B5-3265-306B-9C74-1BEC98986B1A}' failed due to the following error: Error loading type library/DLL. (E开发者_如何学Goxception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
Can someone please help me because I've been struggling for 2 days without success.
Are you debugging using "Attach to Process"?
First determine the w3wp.exe process:
For IIS6
- Start > Run > Cmd
- Go To Windows > System32
- Run
cscript iisapp.vbs
- You will get the list of Running Worker ProcessID and the Application Pool Name.
For IIS7
- Start > Run > Cmd
- Go To Windows > System32 > Inetsrv
- Run
appcmd list wp
Note the Process ID (PID).
Next in Visual Studio:
- Debug > Attach to Process...
- Find the w3wp.exe with the right PID and attach
Your breakpoints should work.
精彩评论