首页 文章

VS2017 - 应用程序洞察:该帐户无权访问AI资源

提问于
浏览
5

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

enter image description here

该帐户无权访问Application Insights资源'<resourcename>' . 请选择有权访问reseource的帐户:

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

1 回答

  • 6

    好的,结果是隐藏在Application Insights Search页面中 . 以下是如何配置它以指向正确的AI资源:

    通过从“视图”>“工具栏”>“应用程序洞察”中选择它来显示“应用程序见解”工具栏:

    Application Insights Search

    这凸显了这个问题 . 您需要从.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>
    

    保存文件并再次右键单击该项目,您应该再次看到“配置应用程序洞察...” . 单击此按钮并重新配置新的(或现有的)AI资源 .

    我还必须使用AI工具栏按钮来选择配置应用程序洞察:

    enter image description here

    然后配置资源设置:

    enter image description here

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

相关问题