开发者

Disable Registry Virtualisation for Visual Studio 2008 on Server 2008

开发者 https://www.devze.com 2023-01-13 09:30 出处:网络
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

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 i开发者_开发技巧n 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.


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)


Only one untested idea. There are Visual Studio 2008 Service Pack 1 Remote Debugger which can be downloaded in three versions: x86, x64 and IA64. (The same files are probably in %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger on your computer). Probably if you will use 64-bit version of remote debugger, then your problem will be solved?

This link "How to: Set Up Remote Debugging" could be also interesting.

0

精彩评论

暂无评论...
验证码 换一张
取 消