VS2017 - Application Insights:该帐户没有访问AI资源的权限
VS2017 - Application Insights: The account does not have permission to access the AI resource
我在 VS 2017 v15.4.0 Preview 3 中有一个项目,不久前我在启用 Application Insights 的情况下将 Web 服务发布到 Azure。我已经从 Azure 门户中删除了 Web 服务及其关联的 AI 资源,但是现在 Visual Studio 报告了以下错误:
该帐户无权访问 Application Insights 资源“<资源名称>”。请 select 一个可以访问资源的帐户:
我可以关闭它,但它仍然每天弹出一两次。我在哪里取消配置?
好的,它原来隐藏在 Application Insights 搜索 页面中。以下是配置它以指向正确的 AI 资源的方法:
通过从查看 > 工具栏 > Application Insights select 显示 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 工具栏按钮 select 配置 Application Insights:
然后配置资源设置:
或者,如果您想从项目中完全删除 Insights,请参阅 this answer。
我在 VS 2017 v15.4.0 Preview 3 中有一个项目,不久前我在启用 Application Insights 的情况下将 Web 服务发布到 Azure。我已经从 Azure 门户中删除了 Web 服务及其关联的 AI 资源,但是现在 Visual Studio 报告了以下错误:
该帐户无权访问 Application Insights 资源“<资源名称>”。请 select 一个可以访问资源的帐户:
我可以关闭它,但它仍然每天弹出一两次。我在哪里取消配置?
好的,它原来隐藏在 Application Insights 搜索 页面中。以下是配置它以指向正确的 AI 资源的方法:
通过从查看 > 工具栏 > Application Insights select 显示 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 工具栏按钮 select 配置 Application Insights:
然后配置资源设置:
或者,如果您想从项目中完全删除 Insights,请参阅 this answer。