WinDbg won't download symbols; says "WARNING: Network path disallowed"
I'm attempting to debug a problem with a .NET service starting up. I'm following the tip here, but I'm having trouble getting symbols. This particularly causes a problem with debugging .NET exceptions, because WinDbg refuses to download the correct mscordawks.dll.
The error I'm getting is: WARNING: Network path disallowed: 'SRV*C:\WebSymbols*http://msdl.microsof开发者_Go百科t.com/download/symbols'
Either it's doing this because I'm debugging something in session 0, or because I'm running WinDbg elevated. How do I resolve this issue?
I'm not clear exactly what you're doing to trigger that error message. I'll assume it's a .sympath command or similar.
Check the output of .netsyms
It's undocumented in the help file, but I spotted it in this blog entry and it seems to work. Maybe it defaults to off under certain security settings. Pure guesswork I'm afraid, but so simple to try that I thought I'd suggest it. It may be that the security context you are using forces .netsyms to be 0. John's trick will then be able to get you symbols from the network which you can use without needing a network symbol path.
Windbg should use the mscordacwks.dll that is part of your .NET installation - you are debugging on the machine that is running the service and therefore windbg has the same .NET installation available to it as your service. There should be no need for windbg to hunt for it anywhere else. Hopefully all that is actually needed is your symbol path to be set "correctly", rather than real problems finding mscordacwks.dll. We can look at that later if it's needed.
Check the current status like this:
0:001> .netsyms
netsyms = don't care
Turning it off produces something similar to your error message:
0:001> .netsyms 0
netsyms = no
0:001> !sympath srv*C:\Symbols*http://msdl.microsoft.com/download/symbols
Network paths are disallowed, symbol server is not available.
Set your symbol path to a symbol tree on the local machine.
Symbol search path is: srv*C:\Symbols*http://msdl.microsoft.com/download/symbols
Expanded Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols
WARNING: Network path disallowed: 'srv*C:\Symbols*http://msdl.microsoft.com/download/symbols'
Turning it on again allows network symbol search paths:
0:001> .netsyms 1
netsyms = yes
0:001> !sympath srv*C:\Symbols*http://msdl.microsoft.com/download/symbols
Symbol search path is: srv*C:\Symbols*http://msdl.microsoft.com/download/symbols
Expanded Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols
Sounds like you are trying to debug one of the system services that may cause a deadlock when the debugger attempts to access the network.
Take a minidump of the process .dump /mf c:\tmp\mydump.dmp
, Attach a debugger to the dump, set your symbol path as above and then .reload
. This will cache all the symbols you need.
Then you can live debug using the path srv*c:\WebSymbols
精彩评论