After 3 days, this problem's doin' my head in.
SignalR is not creating its backplane SQL schema and tables in my pre-prod environment containing a single SQL server + load balanced web servers.
I've checked
- WebSockets are installed in IIS
- DB access allows table and schema creation
- .Net 4.5 is installed and is being used
- Recommended updates are installed
- The steps listed here are complete (with the exception of doing the deployment from Visual Studio - I use MSBUILD to package and then use WebDeploy)
I've piggy backed the SignalR tracing. Only my trace entries are written - nothing from SignalR.
Everything works (including tracing) in my development environment if I build in Release mode.
Here's my tracing-enhanced start-up process
//Step 1: Check tracing works
var trace = GlobalHost.TraceManager["TestTrace"];
trace.TraceInformation("Preparing to start SignalR");
//Step 2: Check DB access rights
var connectionString = ConfigurationManager.ConnectionStrings["SignalR"].ConnectionString;
var schema = Guid.NewGuid().ToString("N");
using (var sqlConn = new System.Data.SqlClient.SqlConnection(connectionString))
{
using (var sqlCmd = new System.Data.SqlClient.SqlCommand())
{
sqlConn.Open();
sqlCmd.Connection = sqlConn;
sqlCmd.CommandText = String.Format("CREATE SCHEMA [{0}]", schema);
sqlCmd.ExecuteNonQuery();
sqlCmd.CommandText = String.Format("SELECT '{0}' AS [Value] INTO [{1}].[ConnectionString]", connectionString, schema);
sqlCmd.ExecuteNonQuery();
}
}
//Step 3: Initialise SignalR
GlobalHost.DependencyResolver.UseSqlServer(connectionString);
app.MapSignalR(); //This is meant to trigger lots of logging.
//Step 4: Confirm we've successfully passed SignalR start-up
trace.TraceInformation("Finished starting SignalR");
Any help would be great. Cheers.