使用SignalR时,mscorlib.dll中出现“System.AggregateException”

请考虑以下代码:

using Microsoft.AspNet.SignalR.Client; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Stock { public string Symbol { get; set; } public decimal Price { get; set; } } class Program { static void Main(string[] args) { var hubConnection = new HubConnection("http://www.contoso.com/"); IHubProxy stockTickerHubProxy = hubConnection.CreateHubProxy("StockTickerHub"); stockTickerHubProxy.On("UpdateStockPrice", stock => Console.WriteLine("Stock update for {0} new price {1}", stock.Symbol, stock.Price)); hubConnection.Start().Wait(); Console.ReadLine(); } } } 

运行时,我收到“mscorlib.dll中出现类型’System.AggregateException’的未处理exception”。 我尝试了这个问题的接受答案,但我不知道如何在那里填写表格。 如何获取此代码示例中出现问题的详细信息? 以下是“Exceptions”窗口对我来说的样子:

在此处输入图像描述

正如Patrick Eckebrecht在对这个问题的评论中指出的那样,点击“查看详细信息”就足以找到exception的原因:

在此处输入图像描述