Is it possible to run SS side by side with .Net Core(.net framework)?

Hi there,
We are about to start a new project with the following and were wondering if it is possible?

  • asp.net core with .net framework (mvc)
  • service stack 4.5.*
  • mvc integration like it was possible in older asp.net mvc

Is it possible to do so?

Thanks,
Kebin

This seems to be conflating a few things. You can run ServiceStack in ASP.NET or ASP.NET Core - they’re 2 different project types.

In ASP.NET you’d need to run ServiceStack on a custom path typically /api as ASP.NET wouldn’t let you run MVC and other ASP.NET HTTP Handlers on the same path.

But in .NET Core you can run ServiceStack and MVC together as they are both configured as different modules in the same .NET Core pipeline so any request not handled by one is passed through and handled by the other.

For examples of ServiceStack + MVC together check out:

Sorry for all the confusions surrounding this. The version of ServiceStack(.core) is not compatible with ASP.NET Core Web Application (.NET Framework) though?

Or can I combine ASP.NET Core Web Application (.NET Framework) with ServiceStack 4.5.*?

The MVC examples above all are ASP.NET Core Web Application (.NET Core).

ServiceStack packages are only for .NET Framework, you’d need to use the *.Core ServiceStack Packages for running on ASP.NET Core.

So in conclusion, I either stick with asp.net mvc .net framework and use servicestack packages or use asp.net core(.net core) and use servicestack *.Core?

Right, after .NET Standard 2.0 is released we’ll merge the .Core packages back into the main NuGet packages.

Thanks! Unfortunately we’ll have to stick with older asp.net mvc then :frowning:

Hi @kebin,

Why not create 2 projects?

one with full featured ServiceStack to create the API, and then other in .Net Core for only the frontend, where you use the ServiceStack.Client.Core to actually consume the API made in the first project. (you can even keep both in the same solution in Visual Studio)

Simply host the API in a host and the frontend in other (api.domain.com + domain.com)

This way you have the best of the 2 worlds… and, enabling the new OpenAPI feature makes it even easier to consume with other platforms, for example, Azure API Management.

This is how we do everything around my current company, we have several frontends that consume microservices (small ServiceStack API’s) making it easier to maintain and scale each service.

And we have now converted an old frontend from WebForms 2.0 to ReactJs using .NET Core and consuming the exact same SS API…

Thats a great idea! Thanks for the guidance. Will definitely lean towards going this route.