Edit on GitHub

v4.0.35 Release Notes

We’re ending 2014 with a short release cycle primarily focused on a polished and fixes Release, ready for before everyone gets back at work - re-energized for a Happy New 2015 work year :)

New TechStacks LiveDemo!

We’ve been gradually refining our modern AngularJS and React Single Page App VS.NET templates which represents what we believe to be the optimal formula for developing future .NET-based JS Apps - utilizing a best-of-breed node.js, npm, bower, grunt/gulp build system.

To this end we’re developing new Single Page Apps alongside to further refine these VS.NET templates and demonstrate their potential in using the pre-configured Grunt tasks to manage the full iterative client/server building, optimization and deployment dev workflows.

We’re happy to be able to preview the latest Live Demo built on the AngularJS App VS.NET template in: https://techstacks.io


TechStacks is a modern AngularJS CRUD App that lets you Browse and Add Technology Stacks of popular StartUps. After Signing in you can add your own TechStacks and favorite technologies to create a personalized custom ‘feed’ to view Websites and Apps built with your favorite programming languages and technologies.

TechStacks is based on a Bootstrap template with client-side features:

and some of TechStacks back-end features include:

TechStacks is a good example of the experience you can get running a packaged ServiceStack/AngularJS App on modest hardware - techstacks.io is currently running on a single m1.small AWS EC2 instance and db.t1.micro RDS PostgreSQL instance that hosts all Live Demos.

View the Source

Checkout the Source Code for TechStacks for the full details to see how it’s built. The project also includes an example client layout for structuring larger AngularJS projects in an extensible layout files and folder structure:

HTML5 Routing and Full-page reloads

One of the disadvantages of Single Page Apps is having to resort to hash-style #! url suffix hacks to prevent JavaScript apps from making full-page reloads. By utilizing AngularJS’s HTML5 mode we can take advantage of modern browsers support for HTML5 History API to retain the optimal pretty urls (we’d have if this were a server generated website) whilst still retaining the responsiveness of JS Apps which are able to load just the minimum content required, i.e. instead of waiting for the full page rendering of Server generated pages and their resource dependencies to be loaded again.

ServiceStack has great support for these modern-style SPA’s which lets you specify a fallback handler for HTML page requests with un-matched routes to return the same /default.cshtml home page so AngularJS is able to handle the request and perform the same client-side routing it would’ve had the url been navigated from within the App - using the AppHost configuration below:

base.CustomErrorHttpHandlers[HttpStatusCode.NotFound] = new RazorHandler("/default.cshtml");

This lets you re-use pretty client-side routes like:

And allow deep-link support for full round-trip requests (i.e. outside of AngularJS) - where since /tech/servicestack doesn’t match any custom Server routes, ServiceStack instead responds with the above /default.cshtml Razor View. At which point AngularJS takes over and navigates to the internal route mapping that matches /tech/servicestack.

To get the latest AngularJS and React.js App templates download the latest ServiceStackVS VS.NET Extension

ServerEvents now supports Multiple Channels per subscription

To ensure each Client only ever needs 1 ServerEvents subscription, subscriptions now support subscribing to multiple channels. Multi Channel Support is fully implemented in all JavaScript ServerEvents and C#/.NET ServerEvents Clients as well as both back-end InMemory and Redis ServerEvents providers.

The API remains similar to the previous Single Channel Routes where in addition to subscribing to a single channel:


Clients can also subscribe to multiple channels:


If preferred, clients can also use the more readable ?channels= plural variable name

And the above example again using the C#/.NET ServerEvents Client:

var client = new ServerEventsClient(BaseUri, "Home");

var client = new ServerEventsClient(BaseUri, "Home", "Work", "Play");

Multi-Channel subscriptions works conceptually similar to having multiple “single channel” subscriptions where multiple Join/Leave/Message events are fired for events occurring in each channel. For more details on this checkout the multi-channel ServerEvents tests.

Chat Apps now support multiple Chat Rooms

With this feature, we can now create Chat Apps that support multiple Chat Rooms using only a single ServerEvents subscription:

React Multi-Channel Chat

Multi-Channel React Chat preview

Surprisingly it only took a small amount of code to add support for multiple chat rooms in all the different Chat Apps which now all support Multiple Chat rooms:

Should you want to run the previous “Single Room” Chat Apps, they’re available in the single-channel branches:

Multi-Channel support is mostly backwards compatible where all Chat Apps can be run as-is when upgraded to use the latest ServiceStack v4.0.35+ - but it does require upgrading both v4.0.35 Client and Server libraries together.

Minor Changes and Fixes

Rest of this release was focused on minor features, changes and fixes:

Framework Changes

Auth Changes

MQ Changes

OrmLite Changes

ServiceStack.Text Changes

Dependencies Updated