故障排除Troubleshooting

本文档介绍运行和使用 Kusto.Explorer 时遇到的常见问题,并提供解决方案。This document provides common difficulties in running and using Kusto.Explorer, and offers solutions. 本文档还介绍了如何重置 Kusto.ExplorerThis document also describes how to reset Kusto.Explorer.

Kusto.Explorer 无法启动Kusto.Explorer fails to start

Kusto.Explorer 在启动过程中或启动后显示错误对话Kusto.Explorer shows error dialog during or after start-up

症状Symptom

在启动时,Kusto.Explorer 显示 InvalidOperationException 错误。At start-up, Kusto.Explorer shows an InvalidOperationException error.

可能的解决方法Possible solution

此错误可能表明操作系统已损坏或缺少某些必需模块。This error may suggest that the operating system became corrupted or is missing some of the essential modules. 若要检查丢失或已损坏的系统文件,请按照下面所述的步骤进行操作:To check missing or corrupted system files, follow the steps described here:
https://support.microsoft.com/help/929833/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system

即使没有更新,Kusto.Explorer 也总要下载Kusto.Explorer always downloads, even when there are no updates

症状Symptom

每次打开 Kusto.Explorer 时,系统都会提示安装新版本。Every time you open Kusto.Explorer, you're prompted to install a new version. Kusto.Explorer 会下载整个包,而不更新已安装的版本。Kusto.Explorer downloads the entire package, without updating the already-installed version.

可能的解决方法Possible solution

此症状可能是本地 ClickOnce 存储中的损坏造成的。This symptom could be a result of corruption in your local ClickOnce store. 你可以通过在提升的命令提示符中运行以下命令来清除本地 ClickOnce 存储区。You can clear the local ClickOnce store, by running the following command, in an elevated command prompt.

重要

  1. 如果存在 ClickOnce 应用程序或 dfsvc.exe 的任何其他实例,请在运行此命令前终止它们。If there are any other instances of ClickOnce applications or of dfsvc.exe, terminate them before running this command.
  2. 所有 ClickOnce 应用将在下次运行时自动重新安装(只要你有权访问存储在应用程序快捷方式中的原始安装位置)。All ClickOnce apps will reinstall automatically the next time you run them, as long as you have access to the original install location stored in the app shortcut. 不会删除应用快捷方式。App shortcuts won't be deleted.
rd /q /s %userprofile%\appdata\local\apps\2.0

尝试再次从其中一个安装镜像安装 Kusto.Explorer。Try installing Kusto.Explorer again from one of the installation mirrors.

ClickOnce 错误:无法启动应用程序ClickOnce error: Cannot Start Application

症状Symptoms

程序无法启动,并显示以下错误之一:The program fails to start and displays one of the following errors:

  • External component has thrown an exception
  • Value does not fall within the expected range
  • The application binding data format is invalid.
  • Exception from HRESULT: 0x800736B2
  • The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)

可通过单击以下错误对话框中的 Details 来浏览错误详细信息:You can explore the error details by clicking Details in the following error dialog:

ClickOnce 错误

Following errors were detected during this operation.
    * System.ArgumentException
        - Value does not fall within the expected range.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
            at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

建议的解决方案步骤Proposed solution steps

  1. 使用 Programs and Features (appwiz.cpl) 卸载 Kusto.Explorer。Uninstall Kusto.Explorer using Programs and Features (appwiz.cpl).

  2. 尝试运行 CleanOnlineAppCache,然后尝试再次安装 Kusto.Explorer。Try running CleanOnlineAppCache, and then try installing Kusto.Explorer again. 从提升的命令提示符执行以下操作:From an elevated command-prompt:

    rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache
    

    再次从其中一个安装镜像安装 Kusto.Explorer。Install Kusto.Explorer again from one of the installation mirrors.

  3. 如果应用程序仍未启动,请删除本地 ClickOnce 存储。If the application still doesn't start, delete the local ClickOnce store. 所有 ClickOnce 应用将在下次运行时自动重新安装(只要你有权访问存储在应用程序快捷方式中的原始安装位置)。All ClickOnce apps will reinstall automatically the next time you run them, as long as you have access to the original install location stored in the app shortcut. 不会删除应用快捷方式。App shortcuts won't be deleted.

    从提升的命令提示符执行以下操作:From an elevated command-prompt:

    rd /q /s %userprofile%\appdata\local\apps\2.0
    

    再次从其中一个安装镜像安装 Kusto.ExplorerInstall Kusto.Explorer again from one of the installation mirrors

  4. 如果应用程序仍未启动:If the application still doesn't start:

    1. 删除临时部署文件。Remove temporary deployment files.

    2. 重命名 Kusto.Explorer 本地 AppData 文件夹。Rename the Kusto.Explorer local AppData folder.

      从提升的命令提示符执行以下操作:From an elevated command-prompt:

      rd /s/q %userprofile%\AppData\Local\Temp\Deployment
      ren %LOCALAPPDATA%\Kusto.Explorer Kusto.Explorer.bak
      
    3. 再次从其中一个安装镜像安装 Kusto.ExplorerInstall Kusto.Explorer again from one of the installation mirrors

    4. 若要从 Kusto.Explorer.bak 还原连接,请从提升的命令提示符执行以下操作:To restore your connections from Kusto.Explorer.bak, from an elevated command-prompt:

      copy %LOCALAPPDATA%\Kusto.Explorer.bak\User*.xml %LOCALAPPDATA%\Kusto.Explorer
      

启用 ClickOnce 详细日志记录Enabling ClickOnce verbose logging

  1. 如果应用程序仍未启动:If the application still doesn't start:
    1. 在以下位置创建 LogVerbosityLevel 字符串值 1,以启用详细 ClickOnce 日志记录Enable verbose ClickOnce logging by creating a LogVerbosityLevel string value of 1 under:

      HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment
      
    2. 再次重现它。Repro it again.

    3. 将详细输出发送到 KEBugReport@microsoft.com。Send the verbose output to KEBugReport@microsoft.com.

ClickOnce 错误:管理员已阻止此应用程序,因为它可能会给你的计算机带来安全风险ClickOnce error: Your administrator has blocked this application because it potentially poses a security risk to your computer

症状Symptom

应用程序安装失败,并出现以下错误之一:The application fails to install with either of the following errors:

  • Your administrator has blocked this application because it potentially poses a security risk to your computer.Your administrator has blocked this application because it potentially poses a security risk to your computer.
  • Your security settings do not allow this application to be installed on your computer.

解决方案Solution

此症状可能是因为另一个应用程序正在替代默认的 ClickOnce 信任提示行为。This symptom could be because another application is overriding the default ClickOnce trust prompt behavior.

  1. 查看默认配置设置。View your default configuration settings.
  2. 将你的配置设置与计算机上的实际设置进行比较。Compare your configuration settings to the actual ones on your machine.
  3. 必要时请重置配置设置,如此操作说明文章中所述。Reset your configuration settings as necessary, as explained in this how-to article.

清除应用程序数据Cleanup application data

有时,如果先前的故障排除步骤无法启动 Kusto.Explorer,清理本地存储的数据可能会有所帮助。Sometimes, when previous troubleshooting steps didn't help with getting Kusto.Explorer to start, cleaning data stored locally may help.

可在此处找到 Kusto.Explorer 应用程序存储的数据:C:\Users\[your username]\AppData\Local\Kusto.ExplorerData stored by Kusto.Explorer application can be found here: C:\Users\[your username]\AppData\Local\Kusto.Explorer.

备注

清除数据会导致丢失已打开的选项卡(“恢复”文件夹)、已保存的连接(“连接”文件夹)和应用程序设置(“UserSettings”文件夹)。Cleaning the data will lead to a loss of opened tabs (Recovery folder), saved connections (Connections folder), and application settings (UserSettings folder).

重置 Kusto.ExplorerReset Kusto.Explorer

如果需要,可以完全重置 Kusto.Explorer。If you need to, you can completely reset Kusto.Explorer. 以下过程介绍如何逐步重置 Kusto.Explorer,直到将其从计算机中删除且必须从头开始安装。The following procedure describes how to progressively reset Kusto.Explorer, until it's removed from your computer and must be installed from scratch.

  1. 在 Windows 中,打开“更改或删除程序”(也称为“程序和功能”) 。In Windows, open Change or remove a program (also known as Programs and Features ).

  2. 选择以 Kusto.Explorer 开头的每个项。Select every item that starts with Kusto.Explorer.

  3. 选择“卸载” 。Select Uninstall.

    如果此过程未能卸载应用程序(ClickOnce 应用程序的已知问题),请参阅本文以获取说明If this procedure fails to uninstall the application (a known issue with ClickOnce applications), see this article for instructions.

  4. 删除文件夹 %LOCALAPPDATA%\Kusto.Explorer,该文件夹用于删除所有连接、历史记录等。Delete the folder %LOCALAPPDATA%\Kusto.Explorer, which removes all connections, history, and so on.

  5. 删除文件夹 %APPDATA%\Kusto,该文件夹用于删除 Kusto.Explorer 令牌缓存。Delete the folder %APPDATA%\Kusto, which removes the Kusto.Explorer token cache. 需要对所有群集重新进行身份验证。You'll need to reauthenticate to all clusters.

也可以还原到特定版本的 Kusto.Explorer:It's also possible to revert to a specific version of Kusto.Explorer:

  1. 运行 appwiz.cplRun appwiz.cpl.
  2. 选择“Kusto.Explorer”,然后选择“卸载/更改” 。Select Kusto.Explorer and select Uninstall/Change.
  3. 选择“将应用程序还原到其先前的状态”。Select Restore the application to its previous state.

后续步骤Next steps