Questions tagged [servicestack]

ServiceStack is Fast, Simple and Versatile message-based Web Services and MQ Framework for .NET and .NET Core

ServiceStack is a simple, fast, versatile and highly-productive full-featured Web and Web Services Framework that's thoughtfully-architected to reduce artificial complexity and promote remote services best-practices with a message-based design that allows for maximum re-use that can leverage an integrated Service Gateway for the creation of loosely-coupled Modularized Service Architectures. ServiceStack Services are consumable via an array of built-in fast data formats (inc. JSON, XML, CSV, JSV, ProtoBuf, MsgPack and Wire as well as XSD/WSDL for SOAP endpoints and Rabbit MQ, Redis MQ, Azure Service Bus and Amazon SQS MQ hosts.

Its design and simplicity focus offers an unparalleled suite of productivity features that can be declaratively enabled without code, from creating fully queryable Web API's with just a single Typed Request DTO with Auto Query supporting every major RDBMS to the built-in support for Auto Batched Requests or effortlessly enabling rich HTTP Caching and Encrypted Messaging for all your existing services via Plugins.

Your same Services also serve as the Controller in ServiceStack's Smart Razor Views reducing the effort to serve both Web and Single Page Apps as well as Rich Desktop and Mobile Clients that are able to deliver instant interactive experiences using ServiceStack's real-time Server Events.

ServiceStack Services also maximize productivity for consumers providing an instant end-to-end typed API without code-gen enabling the most productive development experience for developing .NET to .NET Web Services.

ServiceStack Links

ServiceStack Examples and Live Demos

ServiceStack Downloads

5244 questions
37
votes
1 answer

Are these the main differences between RestSharp and ServiceStack's Client Code?

I have been unable to make a definitive choice and was hoping that somebody (or a combination of a couple of people) could point out the differences between using RestSharp versus ServiceStack's client services (keeping in mind that I am already…
Justin Pihony
  • 66,056
  • 18
  • 147
  • 180
35
votes
3 answers

Stop Fluent Validation on first failure

i'm defining a validation for my Request objects. I would like the validator to stop on the very first failure, not only the one on the same chain. In the example below, if my TechnicalHeader object is null, i get a NullReference exception when the…
pizzaboy
  • 995
  • 1
  • 9
  • 20
33
votes
1 answer

Best design pattern to control permissions on a "per object per user" basis with ServiceStack?

I know that ServiceStack provides a RequiredRole attribute to control permissions, however, this does not fully work for my use case. I have a website with a lot of user-generated content. Users can only edit documents they have explicit permissions…
richardwhatever
  • 4,564
  • 5
  • 23
  • 26
31
votes
1 answer

OData with ServiceStack?

I just saw ServiceStack and I am considering building a service with it. Is it possible to serve OData feeds with service stack so that I'd be able to expose IQueryable and query it from the client?
Shaddix
  • 5,901
  • 8
  • 45
  • 86
31
votes
2 answers

Is it possible to serve HTML pages with ServiceStack?

I'm evaluating ServiceStack for use in a Windows Service to host REST services. So far, it's excellent and way outperforms WCF. Not to mention its much easier to use. The Windows Services mentioned above need to be able to provide a simple HTML page…
Kilhoffer
  • 32,375
  • 22
  • 97
  • 124
31
votes
2 answers

How can I convert an XSD file to C# Class

I have a file in XSD format. How can I convert it to a C# class? I need class reference in other web applications where I need to make post call as per below: var res = client.Post("/customers", c );
Arun Rana
  • 8,426
  • 14
  • 67
  • 107
30
votes
2 answers

How to omit Get only properties in servicestack json serializer?

I have an object which I am de-serializing using ToJson<>() method from ServiceStack.Text namespace. How to omit all the GET only propeties during serialization? Is there any attribute like [Ignore] or something that I can decorate my properties…
Hitesh.Aneja
  • 3,523
  • 3
  • 18
  • 14
28
votes
2 answers

ServiceStack new service side by side ASP.NET MVC website

In the examples for ServiceStack I don't see a single application that is ASP.NET MVC website first and then made ServiceStack service second. Let's take a very simple ASP.NET MVC web application that renders products through Views. It uses…
mare
  • 13,033
  • 24
  • 102
  • 191
26
votes
1 answer

How do you implement authentication in servicestack.net

I'm investigating servicestack.net - but it's examples and articles don't seem to cover authentication - is this something handled by servicestack.net - and if so how? In particular I'm interested in implementing support for: OAuth (So being able…
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
25
votes
1 answer

How to force Monotouch AOT Compiler to see a nested generic method?

I've had to jump through hoops, but I've almost managed to get ServiceStack working on iOS with Monotouch in my project. One runtime JIT exception is holding out: System.ExecutionEngineException: Attempting to JIT compile method…
Felix
  • 1,346
  • 1
  • 12
  • 25
25
votes
2 answers

How to use Servicestack Authentication with Active Directory/Windows Authentication?

I am creating a secure (SSL) public service where the users credentials reside in Active Directory. I want to leverage ServiceStack's Authentication and have read over the wiki article. I already have code written to verify the user credentials with…
BrandonG
  • 876
  • 11
  • 20
25
votes
2 answers

Override field name deserialization in ServiceStack

I'm using ServiceStack to deserialize some HTML form values but can't figure out how to override the value that each field should be read from. For example, the form posts a value to first_name but the property on my POCO is called FirstName. how…
kay.one
  • 7,622
  • 6
  • 55
  • 74
24
votes
1 answer

Why ServiceStack.Text doesn't default dates to iso8601?

If I use Newtonsoft.Json.NET it defaults to iso8601 (i.e.: 2011-06-02T09:34:29+02:00) for serializing/deserializing dates. Why ServiceStack.Text doesn't default to this and I need to specify it as a configuration setting?
knocte
  • 16,941
  • 11
  • 79
  • 125
23
votes
2 answers

Serialize C# Enum Definition to Json

Given the following in C#: [Flags] public enum MyFlags { None = 0, First = 1 << 0, Second = 1 << 1, Third = 1 << 2, Fourth = 1 << 3 } Are there any existing methods in ServiceStack.Text for serializing to the following JSON? { …
Gavin Faux
  • 291
  • 2
  • 6
23
votes
1 answer

Should ServiceStack be the service layer in an MVC application or should it call the service layer?

I'm creating an MVC website and also intend to create a web API for use both within the website and potentially by third parties. From the MVC controllers I'll be calling into a service layer which will contain business logic, act on domain models,…