【问题标题】:VS2017 - Application Insights: The account does not have permission to access the AI resourceVS2017 - Application Insights:该帐户无权访问 AI 资源
【发布时间】:2018-03-29 21:46:44
【问题描述】:

我在 VS 2017 v15.4.0 Preview 3 中有一个项目,不久前我将 Web 服务发布到 Azure 并启用了 Application Insights。我已经从 Azure 门户中删除了 Web 服务及其关联的 AI 资源,但是现在 Visual Studio 报告以下错误:

该帐户无权访问 Application Insights 资源“”。请选择有权访问资源的帐户:

我可以关闭它,但它每天会继续弹出一两次。我在哪里取消配置?

【问题讨论】:

    标签: visual-studio azure visual-studio-2017 azure-application-insights


    【解决方案1】:

    好的,它原来隐藏在 Application Insights 搜索 页面中。以下是如何配置它以指向正确的 AI 资源:

    通过从 View > Toolbars > Application Insights 中选择来显示 Application Insights 工具栏:

    这突出了这个问题。您需要从 .csproj 文件中删除以下两行(右键单击项目,编辑 .csproj):

    <ApplicationInsightsResourceId>/subscriptions/[SUBSCRIPTION_ID]/resourcegroups/[RESOURCE_GROUP_NAME]/providers/microsoft.insights/components/[RESOURCE_NAME]</ApplicationInsightsResourceId>
    <ApplicationInsightsAnnotationResourceId>/subscriptions/[SUBSCRIPTION_ID]/resourcegroups/[RESOURCE_GROUP_NAME]/providers/microsoft.insights/components/[RESOURCE_NAME]</ApplicationInsightsAnnotationResourceId>
    

    保存文件并再次右键单击项目,您应该会再次看到 Configure Application Insights...。单击此按钮并重新配置新的(或现有的)AI 资源。

    我还必须使用 AI 工具栏按钮来选择配置 Application Insights:

    然后配置资源设置:

    或者,如果您想从项目中完全删除 Insights,请参阅 this answer

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-05-19
      • 1970-01-01
      • 1970-01-01
      • 2017-07-01
      • 2020-09-11
      • 2018-11-10
      • 2021-08-01
      相关资源
      最近更新 更多