Server-side rendering without ASP.NET MVC
Is it possible using React.NET?
Sure! See HtmlHelperExtensions.cs to see how it's hooked up in ASP.NET MVC. You could just call the same methods some other way. In 0dbd639efeb1387b1b82850667953e8fd7e441e7 I added an example showing how to render a React component from within a console application. There's a bit more code than I'd like, but it does work.
Basically, this is the code you need for server-side rendering:
var environment = React.AssemblyRegistration.Container.Resolve<IReactEnvironment>();
var component = environment.CreateComponent("HelloWorld", new { name = "Daniel" });
var html = component.RenderHtml();
You can then use environment.GetInitJavaScript() to get the JavaScript required to initialise all the instantiated components client-side. IReactEnvironment should be a per-request singleton (that is, every request creates a new one, but that same instance is shared throughout the entire request).
Hope that helps :)
Many thanx for the detailed answer, Daniel! I haven't tried yet, but it looks pretty helpful.