Visual Studio集成Web服务器错误没有提升

时间:2009-04-26 13:07:44

标签: visual-studio windbg

我在Windows Vista中运行的Visual Studio项目中使用UAC在标准用户中激活(未提升)。

当我尝试在Visual Studio Web Server中运行我的asp.net项目时,进程挂起并开始使用这么多CPU。如果我运行Visual Studio,它可以完美地运行。

这是流程正在做的事情。它似乎正试图访问'Global.net clr网络',但它无法正常工作。

0:000> !clrstack 操作系统线程ID:0xcec(0) ESP EIP
0021f09c 6dd09742 [NDirectMethodFrameGeneric:0021f09c] Microsoft.Win32.NativeMethods.CreateFileMapping(IntPtr,SECURITY_ATTRIBUTES,Int32,Int32,Int32,System.String) 0021f0bc 56a02b0d System.Diagnostics.SharedPerformanceCounter + FileMapping.Initialize(System.String,Int32,Int32) 0021f11c 56a02a30 System.Diagnostics.SharedPerformanceCounter + FileMapping..ctor (System.String,Int32,Int32) 0021f12c 56a05af7 System.Diagnostics.SharedPerformanceCounter.GetCategoryData() 0021f17c 56a056b8 System.Diagnostics.SharedPerformanceCounter..ctor(System.String,System.String,System.String,System.Diagnostics.PerformanceCounterInstanceLifetime) 0021f19c 56a0456c System.Diagnostics.PerformanceCounter.Initialize() 0021f1d0 56a0437f System.Diagnostics.PerformanceCounter.set_RawValue(Int64) 0021f1ec 569ca4d3 System.Net.NetworkingPerfCounters.Initialize() 0021f230 569c980a System.Net.Configuration.SettingsSectionInternal..ctor(System.Net.Configuration.SettingsSection) 0021f270 569e3201 System.Net.Configuration.SettingsSectionInternal.get_Section() 0021f29c 569e2aad System.Net.Sockets.Socket.InitializeSockets() 0021f2ec 569e24e8 System.Net.Sockets.Socket..ctor(System.Net.Sockets.AddressFamily,System.Net.Sockets.SocketType,System.Net.Sockets.ProtocolType) 0021f310 00370758 Microsoft.VisualStudio.WebHost.Server.Start() 0021f33c 0037037b Microsoft.VisualStudio.WebServer.WebServerApp.Main(System.String []) 0021f594 6dce1b4c [GCFrame:0021f594] 0:000> !finalizequeue 要清理的SyncBlocks:0 要发布的MTA接口:0

要发布的STA接口:0

第0代有104256个可终结对象(045e06fc-> 046463fc) 第1代有1个可终结对象(045e06f8-> 045e06fc) 第2代有22个可终结对象(045e06a0-> 045e06f8) 准备完成0个对象(046463fc-> 046463fc) 统计:       MT Count TotalSize类名 573bd7cc 1 20 Microsoft.Win32.SafeHandles.SafeFileHandle 56a4a3f0 1 20 Microsoft.Win32.SafeHandles.SafeLocalMemHandle 57395c34 1 44 System.Threading.ReaderWriterLock 573b8e74 1 56 System.Threading.Thread 56a3e224 1 76 System.Net.Sockets.Socket 56a49d30 1 120 System.Diagnostics.PerformanceCounter 57395bdc 8 128 System.WeakReference 57397ba0 8 160 Microsoft.Win32.SafeHandles.SafeRegistryHandle 56a4a448 104257 2085140 Microsoft.Win32.SafeHandles.SafeFileMappingHandle 共104279个对象

1 个答案:

答案 0 :(得分:-1)

当您在VS中运行ASP.NET项目时,调试Web服务器会运行(如您所说),而不会导致问题。调试是一种特权操作,完全符合UAC要抑制的那种。 UAC的整个想法是,如果没有明确的干预,这种事情就不会发生。

因此,使用提升的权限运行VS.您所看到的行为是设计性的。