v4.5.0 Released!

v4.5.0 Release Notes

We’ve upgraded all ServiceStack packages to .NET 4.5, if you were already using ServiceStack in
.NET 4.5 projects this will be a seamless upgrade like any other release but if your ServiceStack projects
are instead still on .NET 4.0 this will be a breaking change which will require converting all your
projects to .NET 4.5 Framework before upgrading, e.g:

You will also need to have .NET 4.5 Framework installed on any deployment Servers that doesn’t have it already.

Upgraded 3rd Party NuGet packages

Upgrading to .NET 4.5 mean we’re able to reference the latest .NET 4.5 .dlls in packages with 3rd Party
dependencies including, Npgsql, RabbitMQ.Client and ServiceStack.Razor now references the official
Microsoft.AspNet.Razor NuGet package.

.NET Core support for ServiceStack.Redis!

In following the
.NET Core support of our Text and Client libraries
in our last release we’ve extended our support for .NET Core in this release to now also include
ServiceStack.Redis
where we now have .NET Core builds for our Top 3 popular NuGet packages.

To make it easy to start using Redis in a .NET Core App we’ve created a step-by-step guide for
getting started with ServiceStack.Redis on .NET Core
in both Windows and Linux.

New Xamarin.Forms TechStacks App

We’ve added a new TechStacks Mobile App to our expanding showcase of different ways where ServiceStack
provides a seamless end-to-end Typed API development experience for developing Native Mobile Apps which now includes:

Whilst not as flexibile or performant as native code, Xamarin.Forms enables
the most code reuse of all the available options when needing to develop both iOS and Android Apps whilst
still allowing for customization through styling or custom platform specific renderers. It also benefits from being
able to use C# and much of the rich cross-platform libraries in .NET.

Despite sharing the majority of UI code between Android and iOS, Xamarin.Forms Apps also adopts the navigation
idioms of each platform to provide a native “look and feel” which we can see by running the
TechStacks Xamarin.Forms App on iOS and Android:

See the TechStacksXamarin Github project
for more info and access to the source code.

AutoQuery Viewer Saved Queries

We’ve further refined AutoQuery Viewer and added support for
Saved Queries where you can save queries under each AutoQuery Service by clicking the save icon.

The saved query will be listed with the name provided and displayed to the right of the save icon, e.g:

This makes it easy for everyone to maintain and easily switch between multiple personalized views
of any AutoQuery Service.

Create Live Executable Docs with Gistlyn

In our mission to make Gistlyn an immensely useful and collaborative learning tool for
exploring any .NET library, we’ve greatly improved the UX for editing Collections making it easier than ever to
create “Live documentation” which we believe is the best way to learn about a library, mixing documentation and
providing a live development experience letting developers try out and explore what they’ve just learned without
losing context by switching to their development environment and setting up new projects to match each code sample.

Gistlyn also makes it easy to share C# snippets with colleagues or reporting an issue to library mainteners with
just a URL or a saved Gist ID which anyone can view in a browser at gistlyn.com or on their
Desktop version of Gistlyn.

Here’s an example of the new Collection authoring features in action:

The Truly Empty ASP.NET Template

Over the years it’s becoming harder and harder to create an Empty ASP.NET VS.NET Template as it
continues to accumulate more cruft, unused dlls, hidden behavior, hooks into external services and
other unnecessary bloat. Most of the bloat added since ASP.NET 2.0 for the most part has been unnecessary
yet most .NET developers end up living with it because it’s in the default template and they’re
unsure what each unknown dlls and default configuration does or what unintended behavior it will
cause down the line if they remove it.

For ServiceStack and other lightweight Web Frameworks this added weight is completely unnecessary
and can be safely removed.
E.g. most ServiceStack Apps just needs a few ServiceStack .dlls
and a single Web.config mapping
to tell ASP.NET to route all calls to ServiceStack. Any other ASP.NET config you would add in
ServiceStack projects is just to get ASP.NET to disable any conflicting default behavior.

The Minimal ASP.NET Template we wanted

Out of frustration we’ve decided to reverse this trend and instead of focusing on what can be added,
we’re focusing on what can be removed whilst still remaining useful for most modern ASP.NET Web Apps.

With this goal we’ve reduced the ASP.NET Empty Template down to a single project with
the only external dependency being Roslyn:

Most dlls have been removed and the
Web.config
just contains registration for Roslyn and config for disabling ASP.NET’s unwanted default behavior.

The only .cs file is an Empty Global.asax.cs with an empty placeholder for running custom code on Startup:

using System;

namespace WebApplication
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            
        }
    }
}

And that’s it! ASP.NET Empty is a single project empty ASP.NET Web Application with no additional references.

Minimal but still Useful

You can then easily Convert this empty template into a functional ServiceStack Web App by:

  1. Installing ServiceStack and any other dependency you want to use, e.g:

    PM> Install-Package ServiceStack
    PM> Install-Package ServiceStack.Redis

  2. Adding the ASP.NET HTTP Handler mapping to route all requests to ServiceStack:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
	    <add path="*" name="ServiceStack.Factory" type="ServiceStack.HttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true"/>
    </handlers>
</system.webServer>
  1. Adding your ServiceStack AppHost and Services in Global.asax.cs.

That’s all that’s needed to create a functional Web App, which in this case creates a
Backbone TODO compatible REST API with a Redis back-end
which can power all todomvc.com Single Page Apps.

Other Features

Auto rewriting of HTTPS Links

ServiceStack now automatically rewrites outgoing links to use https:// for Requests that were forwarded
by an SSL-terminating Proxy and containing the X-Forwarded-Proto = https HTTP Header.
You can override AppHost.UseHttps() to change this behavior.

This topic is now pinned globally. It will appear at the top of its category and all topic lists until it is unpinned by staff for everyone, or by individual users for themselves.

This topic is now unpinned. It will no longer appear at the top of its category.