【发布时间】:2015-06-04 23:30:38
【问题描述】:
考虑以下代码:
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<Stock>("UpdateStockPrice", stock => Console.WriteLine("Stock update for {0} new price {1}", stock.Symbol, stock.Price));
hubConnection.Start().Wait();
Console.ReadLine();
}
}
}
运行时,我收到“在 mscorlib.dll 中发生‘System.AggregateException’类型的未处理异常”。我尝试了这个问题的公认答案,但我不知道如何在那里实际填写表格。如何获取有关此代码示例中出了什么问题的详细信息?这是我的“例外”窗口的样子:
【问题讨论】:
-
Visual Studio 显示一个异常窗口,其中包含指向更多详细信息的链接。您向我们展示的窗口只是您的视觉工作室的设置窗口。
标签: c# .net signalr unhandled-exception