This is not really a full answer but perhaps what I did may help someone get a little further.
After filling in some unrelated voids on the dev branch of Mono (which at the time was v3.99) like AppendTrailingBackslash(), GetBufferlessInputStream() and a few other functions, I was able to get an MVC5 app to come up and function OK on Ubuntu using XSP4.
I then tried to use OWIN and the mono-built version of SignalR.
I did what Appleman1234 suggested above, implement RegisterModule() in HttpApplication.cs to do what Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule() does. This does seem to work and injects the module string into the system.web/httpModules section without error.
This combined with manually specifying the OwinHttpHandler in my system.web:
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<customErrors mode="Off" />
<httpHandlers>
<add verb="*" path="*" type="Microsoft.Owin.Host.SystemWeb.OwinHttpHandler, Microsoft.Owin.Host.SystemWeb" />
</httpHandlers>
</system.web>
and calling the default MapSignalR() in my Startup Configuration():
var appBuilder = app.MapSignalR();
and after hacking up some of the SignalR code (I was getting some ReadOnlyException on a NameValueCollection as it tried to remove the Accept-Encoding from the request headers... I figured I'd get to that later), I think I got it to initialize all the way to the point where I could at least browse to /signalr and get some meaningful errors back (missing connectionId, unknown protocol, etc). I didn't get to actually testing the SignalR functionality, but I am about to do so by using a separate client program.
I am hosting this using xsp4/mono 4.5.
However, in doing so I think I clobbered the rest of the handlers/pipeline because I cannot really browse to anything else in the website (stylesheets, scripts, etc), as I get a 404
Also note that:
(1) HttpRuntime.UsingIntegratedPipeline
returns false in the context of XSP4.
(2) I had to comment out the exception in HttpApplication.cs/AsyncInvoker::Invoke()
, which originally threw this exception:
throw new Exception("This is just a dummy");
Given this, is there simply not yet enough Async and other support in Mono to get OWIN/SignalR to work? I am thinking that since UsingIntegratedPipeline
returns false that it's a no-go for XSP4?