I've been developing a Web Service (C# WebAPI2) so can simply send messages using SignalR and then store the message transcript within a TSQL database. However, after moving the SignalR hubs within a class library I can't seem to access them now. I have developed a very simply console application to communicate with the Web Service but I am getting a strange exception being thrown.
Here is the exception which is being thrown:
"StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:\r\n{\r\n Transfer-Encoding: chunked\r\n X-SourceFiles: =?UTF-8?B?QzpcRGV2ZWxvcG1lbnRcU291cmNlQ29kZVxTVVBTZXJ2aWNlXFNVUC5TZXJ2aWNlXHNpZ25hbHJcbmVnb3RpYXRl?=\r\n Cache-Control: private\r\n Date: Wed, 11 Mar 2015 10:50:18 GMT\r\n Server: Microsoft-IIS/8.0\r\n X-AspNet-Version: 4.0.30319\r\n X-Powered-By: ASP.NET\r\n Content-Type: text/html; charset=utf-8\r\n}"
An unhandled exception of type 'System.AggregateException' occurred in SignalR Client Connection.exe
The Owin Startup file is placed within the Web Service App_Start folder, here is what it looks like:
using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using Owin;
using Microsoft.AspNet.SignalR;
[assembly: OwinStartup(typeof(Service.App_Start.Startup))]
namespace Service.App_Start
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.Map("/signalr", map =>
{
var hubConfiguration = new HubConfiguration
{
EnableDetailedErrors = true,
EnableJSONP = true
};
map.RunSignalR(hubConfiguration);
});
}
}
}
Many thanks.