ServiceStack: Generate OpenAPI spec without creating the Service implementation classes
ServiceStack has support for OpenAPI and can generate an OpenAPI spec. However, for APIs/endpoints to be generated in the spec, it is not enough to specify the API details using the Route attributes a...
- Modified
- 28 Nov at 09:41
How to make Servicestack serialize an implicit string overload the way I want it to?
I have a small class which I am using to make sure the strings sent and received by a service remain URL safe without additional encoding (see below). Ideally I would like to just apply this type to m...
- Modified
- 22 Nov at 23:3
Filtering AutoQuery Results to Only Display Table Rows that Match Data in the Users Session
I'm working on a project that want's to control data access in a multi-tenant system. I've got a table set up which has a row on it that says what tenant the object applies to. Let's call this propert...
- Modified
- 21 Nov at 23:2
What are the advantages of using `lock` over `SemaphoreSlim`?
I'm late to the party, but I recently learned about [`SemaphoreSlim`][1]: I used to use [`lock`][2] for synchronous locking, and a `busy` boolean for asynchronous locking. Now I just use `SemaphoreSli...
- Modified
- 5 May at 16:46
Why is the Enumerable.Any(Func<TSource, bool> predicate) slow compared to a foreach with an if statement when searching a List<T>
Something has piqued my curiosity recently.. is the `Enumerable.Any(Func<TSource, bool> predicate)` method than manual foreach, I've been messing with some benchmarks and thought of this. I'm check...
Use AuthFeature but disable SessionFeature?
I have a ServiceStack service that is always sent a JWT every request, so it seems to me that I do not need a persistent session whatsoever. How can I disable the SessionFeature yet keep the JwtAuthPr...
- Modified
- 18 Nov at 01:33
Why does Microsoft have both Avalonia UI and .NET MAUI?
.Net Conf is currently underway and I learnt about something called Avalonia UI. (I use .NET MAUI) After doing some research, Avalonia UI was primarily a desktop UI framework that now supports Android...
- Modified
- 5 May at 14:55
Could not load file or assembly 'System.Runtime, Version=7.0.0.0...' - After installing .NET Core 7 'dotnet watch run' not working
After the .Net 7.0 update, when I use `dotnet watch run` I get this error: > Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Cul...
- Modified
- 21 Nov at 11:6
SDK Resolver Failure - Net 7 - Net 6
Just downloaded and installed SDK Net 7.0.100 and it broke existing applications and they won't load any more in VS 2022 or Rider. Copied the follwing error: ``` error : SDK Resolver Failure: "The SD...
- Modified
- 16 Nov at 09:10
Why does sending via a UdpClient cause subsequent receiving to fail?
I'm trying to create a UDP server which can send messages to all the clients that send messages to it. The real situation is a little more complex, but it's simplest to imagine it as a chat server: ev...
How to obtain progress feedback on long running async API calls in ServiceStack
We make several long-running, async, API calls using the Jsonclient to a ServiceStack host. These calls perform a number of closely linked tasks. I would like to obtain some feedback as to the curre...
- Modified
- 29 Oct at 02:56
How do you access the user's bearer token in a ServiceStack service?
I have a ServiceStack service which is receiving a bearer token, the bearer token then needs to be passed onto Microsoft Graph for additional API calls from the server side What is the best way to acc...
- Modified
- 27 Oct at 22:21
How does a Span survive garbage collection?
I'm pretty convinced that creating a Span from an array doesn't fix (in the sense of the `fixed` keyword) the underlying array, otherwise there wouldn't be a need for `Span.GetPinnableReference` and s...
- Modified
- 12 May at 04:18
ServiceStack external dependency with ILogger dependency
I have a ServiceStack host which depends on an external class which has a constructor of the form ``` public class MyClass(ILogger<MyClass) {} ``` but when I call ``` container.AddSingleton<ISearchEn...
- Modified
- 18 Oct at 00:11
Does ServiceStack.RabbitMq support creating Quorum queues?
RabbitMQ allows for ['Quorum Queues'](https://www.rabbitmq.com/quorum-queues.html#feature-comparison). As far as I have read in the documentation, 'quorum' queues allow queues to be replicated on all ...
- Modified
- 14 Oct at 11:29
Adding Request Headers to a manually instantiated ServiceStack object?
``` using(var service = new PlacementService()) { service.Request.Headers.Add("Impersonated", "1"); //NULL Exception thrown } ``` I need to be able to set a header on a manually instantiated Ser...
- Modified
- 12 Oct at 14:9
Why do string hash codes change for each execution in .NET?
Consider the following code: ``` Console.WriteLine("Hello, World!".GetHashCode()); ``` First run: > 139068974 Second run: > -263623806 Now consider the same thing written in Kotlin: ``` println("Hell...
- Modified
- 11 Oct at 06:36
42804: column "tree_path" is of type ltree but expression is of type text - npgsql 6.0
Note that this question has been asked before, in 2017 before Ltree support was added to Npgsql. So it's time to ask it again. I'm using ORMLite with the `UpdateAsync<T>()` method. The TreePath proper...
- Modified
- 7 Oct at 16:22
How to use unity container registered Named Type in ServiceStack Requesthandler
I am using ServiceStack (5.12.0) in my ASP.NET service along with Unity Container. I am registering instances of same type as follows ``` public static IUnityContainer Create() { container.Regist...
- Modified
- 16 Feb at 02:38
ServiceStack API Explorer: Login form not working when deployed to IIS as a "sub-application"
I have a aspnet core (dotnet 6) application that uses ServiceStack authentication. The built-in login form is displayed when the browser tries to access protected services, as expected. One can login ...
- Modified
- 6 Oct at 13:10
RabbitMQ Errors AlreadyClosedException
I have a .Net 6 microservice application which is receiving occasional RabbitMQ errors although there doesn't appear to be an excessive rate of messages on the queue it is trying to write to. The erro...
- Modified
- 5 Oct at 13:8
Cannot add or update a child row: a foreign key constraint fails in vb.net
I have an error on create or add product in mysql is there something wrong. is there something wrong with my code? thanks [](https://i.stack.imgur.com/s6Hgf.jpg) [](https://i.stack.imgur.com/clrwz.jpg...
- Modified
- 30 Sep at 06:35
ServiceStack request fails with error 401, but the Session is authenticated
In GlobalRequestFilters I have something like this: ``` var session = new AuthUserSession() { AuthProvider = "credentials", IsAuthenticated = true, Id = $"a unique string", ... }; req....
- Modified
- 27 Sep at 07:14
ServiceStack Locode Multi select option
I am developing an app and got a feature where an user can assign multiple 's to a . I want the Create Feature page () to populate the list of available users so that the end-user can assign multipl...
- Modified
- 15 Sep at 02:18
Consuming Server Sent Events in .NET
I am working on a service which consumes SSE from the Validic Inform platform to handle wearable device data, and process it for our other various services. Currently there is a complex solution in or...
- Modified
- 15 Sep at 17:48