首页 > 其他分享 >WebMatrix3 启动报KeyNotFoundException错误解决方法

WebMatrix3 启动报KeyNotFoundException错误解决方法

时间:2023-04-05 10:03:58浏览次数:36  
标签:IntPtr KeyNotFoundException 错误 Windows WebMatrix3 Object System Threading Micros


我上网下载了WebMatrix3 、iis express8

安装以后运行WebMatrix3 报错,日志如下:

System.Collections.Generic.KeyNotFoundException: 要使用的命令不在有效命令列表中。The command being used is not in the list of valid commands.

应用程序: WebMatrix.exe

Framework 版本: v4.0.30319

说明: 由于未经处理的异常,进程终止。

异常信息: System.Collections.Generic.KeyNotFoundException

堆栈:

   在 Microsoft.WebMatrix.Core.CommandManagerImplementation.get_Item(Microsoft.WebMatrix.Core.CommandId)

   在 Microsoft.WebMatrix.Core.StartPageViewModel.InitializeNewMenu()

   在 Microsoft.WebMatrix.Core.StartPageViewModel.InitializeButtonViewModels()

   在 Microsoft.WebMatrix.Core.StartPageViewModel..ctor(System.IServiceProvider)

   在 Microsoft.WebMatrix.Core.StartPage..ctor(System.IServiceProvider)

   在 Microsoft.WebMatrix.Core.ShellMainWPF.OnShellMainWPFLoaded(System.Object, System.Windows.RoutedEventArgs)

   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)

   在 System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)

   在 System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)

   在 System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)

   在 System.Windows.BroadcastEventHelper.BroadcastEvent(System.Windows.DependencyObject, System.Windows.RoutedEvent)

   在 System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(System.Object)

   在 MS.Internal.LoadedOrUnloadedOperation.DoWork()

   在 System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()

   在 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   在 System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)

   在 System.Windows.Media.MediaContext.RenderMessageHandler(System.Object)

   在 System.Windows.Media.MediaContext.Resize(System.Windows.Media.ICompositionTarget)

   在 System.Windows.Interop.HwndTarget.OnResize()

   在 System.Windows.Interop.HwndTarget.HandleMessage(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr)

   在 System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   在 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   在 MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)

   在 MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr, Int32, IntPtr, IntPtr)

   在 MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)

   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   在 Standard.NativeMethods._SetWindowRgn(IntPtr, IntPtr, Boolean)

   在 Standard.NativeMethods.SetWindowRgn(IntPtr, IntPtr, Boolean)

   在 Microsoft.Windows.Shell.WindowChromeWorker._ClearRoundingRegion()

   在 Microsoft.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean)

   在 Microsoft.Windows.Shell.WindowChromeWorker._ApplyNewCustomChrome()

   在 Microsoft.Windows.Shell.WindowChromeWorker.<_SetWindow>b__1(System.Object, System.EventArgs)

   在 System.Windows.Window.OnSourceInitialized(System.EventArgs)

   在 System.Windows.Window.CreateSourceWindow(Boolean)

   在 System.Windows.Window.CreateSourceWindowDuringShow()

   在 System.Windows.Window.SafeCreateWindowDuringShow()

   在 System.Windows.Window.ShowHelper(System.Object)

   在 System.Windows.Window.Show()

   在 System.Windows.Application.b__f(System.Object)

   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   在 System.Windows.Threading.DispatcherOperation.InvokeImpl()

   在 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)

   在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   在 System.Windows.Threading.DispatcherOperation.Invoke()

   在 System.Windows.Threading.Dispatcher.ProcessQueue()

   在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   在 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   在 MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   在 System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

   在 System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)

   在 System.Windows.Threading.Dispatcher.Run()

   在 System.Windows.Application.RunDispatcher(System.Object)

   在 System.Windows.Application.RunInternal(System.Windows.Window)

   在 System.Windows.Application.Run(System.Windows.Window)

   在 Microsoft.WebMatrix.Core.WebMatrixShellApplication.Execute(Boolean, Boolean, Boolean, Boolean)

   在 Microsoft.WebMatrix.Core.ShellApplicationHelper.Execute(StartupFlags)

   在 Microsoft.WebMatrix.Core.ShellApplicationHelper.Execute()

   在 Microsoft.WebMatrix.EntryPoint.Main(System.String[])

--------

2015/3/30 16:27:17

--------

System.Collections.Generic.KeyNotFoundException: 要使用的命令不在有效命令列表中。

   在 Microsoft.WebMatrix.Core.CommandManagerImplementation.get_Item(CommandId id)

   在 Microsoft.WebMatrix.Core.StartPageViewModel.InitializeNewMenu()

   在 Microsoft.WebMatrix.Core.StartPageViewModel.InitializeButtonViewModels()

   在 Microsoft.WebMatrix.Core.StartPageViewModel..ctor(IServiceProvider serviceProvider)

   在 Microsoft.WebMatrix.Core.StartPage..ctor(IServiceProvider serviceProvider)

   在 Microsoft.WebMatrix.Core.ShellMainWPF.OnShellMainWPFLoaded(Object sender, RoutedEventArgs e)

   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   在 System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

   在 System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)

   在 System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)

   在 MS.Internal.LoadedOrUnloadedOperation.DoWork()

   在 System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()

   在 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   在 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   在 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   在 System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)

   在 System.Windows.Interop.HwndTarget.OnResize()

   在 System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)

   在 System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

问题原因:你是直接安装没有使用Microsoft Web Platform Installer,自行安装少了很多依赖项。

不同版本的WebMatrix3 所需依赖组件不同,今天下载WebMatrix3 对应Microsoft Web Platform V5.0

需要安装下列组件:(64位系统为例,32位系统不用装标有x64的组件)

Microsoft SQL Server 2012 Transact-SQL ScriptDom

Microsoft SQL Server 2012 Data-Tier Application Framework 11.0 x86(2012 年 4 月)

Microsoft SQL Server 2012 Data-Tier Application Framework 11.0 x64(2012 年 4 月)

Microsoft WebMatrix 3

Microsoft System CLR Types for Microsoft SQL Server 2012 (x64)

Microsoft System CLR Types for Microsoft SQL Server 2012 (x86)

Web Deploy 3.0 - 2012 年 7 月

 这些组件可以自行去微软下载中心搜索安装,也可以直接装visual studio express 2012/2013解决。

visual studio express 2012/2013 或者sqlserver 2012 express共用。

测试系统(全部是笔记自带原装系统):

windows 8 中文版(64位)

windows 7 家庭版(32位)

标签:IntPtr,KeyNotFoundException,错误,Windows,WebMatrix3,Object,System,Threading,Micros
From: https://blog.51cto.com/u_696257/6170240

相关文章

  • Java笔记(8) 异常和错误
    异常的简单分类检查性异常:最具代表性的检查性异常是用户错误或问题引起的异常,这是程序员无法预见的。例如用户要打开一个不存在的文件,一个异常就发生了,这些异常在编译时不能被简单的忽略。运行时异常:运行时异常是可能被程序员避免的异常,与检查性异常相反,运行时异常可以在编译时......
  • 645.错误的集合
    错误的集合集合s包含从1到 n 的整数。不幸的是,因为数据错误,导致集合里面某一个数字复制了成了集合里面的另外一个数字的值,导致集合丢失了一个数字并且有一个数字重复。给定一个数组nums代表了集合S发生错误后的结果。请你找出重复出现的整数,再找到丢失的整数,将它......
  • 《基于Modern工具包的本地化方式》的错误修正
    在《基于Modern工具包的本地化方式》一文中实现的本地化方式忽略了在切换语言后,原始的文本值已经改变,要想再切换回去,由于找不到对应的本地化值,最终切换不了,因而,必须在第一次切换的时候记录下原始文本值,这样才能保证每次切换的时候都能找到对应值。在前文中还有一个bug是当本地化先......
  • 创建返回错误信息提示枚举值
    @Data@BuilderpublicclassErrorResult{privateStringerrCode;privateStringerrMessage;publicstaticErrorResulterror(){returnErrorResult.builder().errCode("999999").errMessage("系统异常稍后再试").build();}......
  • 内核错误调试技巧记录
    printk打印调试include/linux/printk.h头文件externintconsole_printk[];#defineconsole_loglevel(console_printk[0])#definedefault_message_loglevel(console_printk[1])#defineminimum_console_loglevel(console_printk[2])#definedefault_console_loglevel......
  • C#异常没有错误行号的原因
    异常处理是编程中必知必会的重要内容,我们经常使用try-catch来捕获和记录异常信息的原因、位置信息,以便进行排查和解决问题。使用堆栈信息可明确抛出异常具体行号,但有时输出的却没有行号。如123System.DivideByZeroException:尝试除以零。在ExceptionTest.Form1.F......
  • Linux c语言编程./a.out运行提示段错误
    段错误,几种可能:一、函数没有头文件(是的,有时候gcc不会提示没有头文件);二、函数重复定义,全局变量定义后、局部变量又定义了。(一般是调试的时候,代码改来改去,遗漏所致)三、Linux发行版系统差异,虽然都是Linux内核,同样的函数Ubuntu和CentOS需要的头文件就不一样,具体查看ma......
  • git pull遇到错误:error: Your local changes to the following files would be overwr
    error:Yourlocalchangestothefollowingfileswouldbeoverwrittenbymerge:意思是我台式机上新修改的代码的文件,将会被git服务器上的代码覆盖;我当然不想刚刚写的代码被覆盖掉,看了git的手册,发现可以这样解决:方法1:如果你想保留刚才本地修改的代码,并把git服务器上的代码pu......
  • -bash: yum: command not found 错误
    以下都是在centos命令行输入查看有无yum安装包,有的话卸载:查看:rpm-qa|grepyum卸载:rpm-aq|grepyum|xargsrpm-e--nodeps第一步:到这个网站去下载如下RPM包:http://mirrors.163.com/centos/6/os/x86_64/Packages/下载安装以下4个包,由于更新问题,可能包名版本不一样,可以查找开......
  • SpringBoot启动异常的错误①
    java:无法访问org.springframework.boot.SpringApplication错误的类文件:/D:/maven/repository/org/springframework/boot/spring-boot/3.0.5/spring-boot-3.0.5.jar!/org/springframework/boot/SpringApplication.class类文件具有错误的版本61.0,应为52.0 2023-04......