2

I have a problem with a web service I'm trying to debug. There is a problem with the web service, but I don't seem to be able to get a handle on it, because when I run the same project in the Visual Studio Debugger, it can't find any relevant registry keys. They are just coming up null. When I tried listing all the available keys in HKLM\Software the list is completely different to what I can see in RegEdit. It seems that Visual Studio is being subjected to some kind of Registry Virtualisation that the same code being run from IIS is not subject to.

I'm running Visual Studio as an Administrator ( and running it in the administrative role ) and this problem only just seems to have appeared- the same code worked fine yesterday, which makes it even more confusing.

Is there a way I can make Visual Studio's debugger/ASP.Net development server run in the same way that the process is running live? If not, is there an easy way to identify the process that my web service will be running in so I can just attach to that and debug from it that way?

Edit: The problem doesn't appear to relate to the Wow6432Node subkey as the registry keys in question relate to a 64-bit application. However I can't even see the existence of the Wow6432Node key from my code if it is running in the Visual Studio debugger.

4

2 に答える 2

1

It's related to registry virtualization, look here: http://msdn.microsoft.com/en-us/library/aa965884.aspx

It means that per-user you can have different registries. This is particularly annoying if you are running as a service-user (asp.net) because you will get 'empty' registry-keys - because windows will look in a virtualized copy of HKML for this user instead of the 'global' HKLM registry key (which you see when running regedit)

于 2011-09-29T08:54:38.443 に答える
0

テストされていないアイデアは1つだけです。Visual Studio 2008 Service Pack 1リモートデバッガーがあり、x86、x64、およびIA64の3つのバージョンでダウンロードできます。(同じファイルがおそらく%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debuggerあなたのコンピュータにあります)。おそらく、64ビットバージョンのリモートデバッガーを使用する場合、問題は解決しますか?

このリンク「方法:リモートデバッグの設定」 も興味深いかもしれません。

于 2010-08-24T22:43:32.933 に答える