【问题标题】:Application Insights not working - socket exceptionApplication Insights 不起作用 - 套接字异常
【发布时间】:2015-02-03 14:09:06
【问题描述】:

我在我的 Windows 商店应用程序中添加了 Application Insights,并且在输出中我有很多行出现异常。

我收到 ApplicationInsight 消息:

Application Insights Telemetry: {"ver":1,"name":"Microsoft.ApplicationInsights.PageView",.............}

例外情况:

A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll
A first chance exception of type 'System.TimeoutException' occurred in Microsoft.ApplicationInsights.winmd
A first chance exception of type 'System.TimeoutException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll

异常消息是:

Message "An attempt was made to access a socket in a way forbidden by its access permissions 23.101.68.210:443"

我真的不知道是什么导致了这个异常。我尝试关闭防火墙但没有成功。我尝试在 VS 2013 中使用更新 4 开发应用程序,机器使用 Windows 2012 R2

感谢您的建议。

【问题讨论】:

标签: windows-store-apps azure-application-insights


【解决方案1】:

如果这是在 Windows 商店应用程序上,您是否打开了清单中允许应用程序发出出站网络请求的功能?

查看相关: An attempt was made to access a socket in a way forbidden by its access permissions

我让拥有这些说明的团队在此处更新了他们的页面:http://azure.microsoft.com/en-us/documentation/articles/app-insights-windows-monitor-usage-crashes/,因此如果您遵循这些说明,它会专门要求检查此设置。 (调查了一下,好像windows phone silverlight是目前唯一默认关闭这个设置的模板,目前所有的模板都默认开启网络访问?)

【讨论】:

  • OMG ...这很容易,但无处可查...我在开发 winRT 应用程序方面没有比你更多的经验。你为我节省了大量的调查时间。我不知道我是否赢了,但至少我的 VS 输出窗口中没有异常消息。
  • 我会向拥有手机/商店 sdk 的团队发送一份说明,以确保他们也将其放入文档中。
  • 谢谢,我很感激。也许它也对其他人有帮助。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-12-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-09-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多