Disabling .NET 6 features per default
When creating a new project in VS 2022 with .NET 6, following new features are added automatically: - - Is there a way to create a .NET 6 project - without top-level-statements (a workaround other th...
- Modified
- 20 Mar at 18:32
How do you do database.ensurecreated() in aspnet core web application using .NET 6?
In a .NET 5 web application, we use code such as the following in startup.cs to initialize the DB using Entity Framework: In .NET 6 though, I get the error that there is no ApplicationServices. I trie...
- Modified
- 5 May at 15:46
How to fix build error on ASP.NET Core + ServiceStack?
I have a problem when creating a new web service using ServiceStack I have installed : - - - - However If I try to create a new project , this will come up and create it. ``` C:\Users\noliveros\Deskt...
- Modified
- 11 Mar at 10:6
Add service from another dll of another solution
We use ServiceStack 5.9.2 and have a ready, running application build with Visual Studio. Is it possible to add additional services to this application which were build in another Visual Studio soluti...
- Modified
- 11 Mar at 08:52
How to ignore empty list when serializing to json?
I am trying to figure out how to serialize to a json object and skip serializing properties whose values are empty lists. **I am not using Newtonsoft json** using System.Text.Json; using System.T...
- Modified
- 7 May at 07:0
How to start on ServiceStack?
Can you help me point out how should I start on this: I'm new to API , and I'm currently working on ASP.NET Core 3.1 MVC paired with Microsoft SQL Server. I have requirement that I should use API (Ser...
- Modified
- 9 Mar at 11:9
Add methods to Program.cs in .NET 6
In the Program.cs for .NET 5, you could add methods under the Main(string[] args) method. With .NET 6, the Main method exists, but isn't physically included in the Program.cs file by default. To that ...
ServiceStack v6 - Route starting with /api produces NotImplementedExceptio
### Greetings. I started a new project with . I noticed that when I use routes starting with `/api`, they will produce a `NotImplementedException` when called. I believe this is due to the new API ...
- Modified
- 8 Mar at 13:59
ServiceStack marker Attribute not found in Collection
I have a custom attribute and I want to check via a GlobalFilter, if the methods I'm calling has this marker attribute. I can't find a way, to get the information that the called method where my requ...
- Modified
- 3 Mar at 11:16
Service Stack 6 UI
I recently upgraded to ServiceStack 6 and trying to get the API UI to work. I have 2 issues. After I authenticate (I have custom CredentialsAuthProviderSync) I still get an error that I need to authen...
- Modified
- 2 Mar at 05:11
ASP.NET Core 6 app not able to find UseWindowsService
My objective is to run an ASP.NET Core 6 app as Windows service in the simplest way, which I understood to use the code shown below. I have included both of these lines (though only the top should be ...
- Modified
- 7 May at 05:38
Replacement for Automapper's ForAllOtherMembers()
ForAllOtherMembers extension method was removed from Automapper 11 I use it to ignore conventional mappings for properties other than the one mentioned before like this ``` ForAllOtherMembers(opt=>opt...
- Modified
- 1 Mar at 16:2
Minimum API Key ServiceStack authentication + authorization
I would like to use API key to access secured ServiceStack web service simply as possible: - - - - - - - - - I am able to call a service with Bearer token (API key). It returns 200 Forbidden. ApiKeyA...
- Modified
- 1 Mar at 08:12
Im not able to mock ServiceBusReceivedMessage and ServiceBusMessageActions
we want to write unit-test for servicebus message trigger. we are using [Azure.Messaging.ServiceBus](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/) nuget package ``` [FunctionName("servie...
- Modified
- 28 Feb at 09:35
WSDL - allow different order of DataMembers for SOAP messages
We use ServiceStack 5.9.2. DTO: ``` [DataContract] [Restrict(Usage.SoapOnly)] public class GetDocumentations : Documentations { } [DataContract] [Api("Abfrage auf von geplant...
- Modified
- 22 Feb at 09:33
How to create a global variable in ASP.NET Core Web API application?
How can I create a global variable in an ASP.NET Core Web API application? In ASP.NET MVC, I could do it like: `Application[""] = ` I tried the same in my web API application, but was unable to find a...
- Modified
- 6 May at 20:24
ServiceStack Admin UI
I'm trying to integrate the `/admin-ui` functionality in my application, that uses the ServiceStack's built-in ApiKeyAuthProvider, for give the user the possibility to register other users. In the lo...
- Modified
- 20 Feb at 08:20
JsonServiceClient not respecting RedirectHttpHandler response
We have a global handler setup for catching a specific type of exception. It is possibly thrown from multiple service endpoints using a base service implementation. We bind the error handlers and try ...
- Modified
- 18 Feb at 13:59
ServiceStack - Custom UserAuth/Details
Is it possible to configure a class that implements both IUserAuth and IUserAuthDetail and used it when registering the IAuthRepository? Actually we use this class doing `new OrmLiteAuthProvider<OurC...
- Modified
- 17 Feb at 18:13
ServiceStack - IAuthRepository vs IUserAuthRepository
I’ve to configure my web application to use the ServiceStack built-in ApiKeyAuthProvider. I’ve registered in the container the OrmLiteAuthRepository with the IAuthRepository interface but it throws an...
- Modified
- 17 Feb at 21:0
C# - .NET 6 - Console app with Generic Host vs without
I am using the new top-level statements in .NET 6 to create a simple console application, but I don't understand the advantages/disadvantages of using the "Generic Host". Can you explain? My code with...
- Modified
- 17 Feb at 11:3
ServiceStack v6 JWTAuthProvider doesn't return bearer and resfresh tokens
I downloaded the .NET6 project template from ServiceStack web, fiddling around and successfully setup the authentication using CredentialAuthProvider. However when adding the , ~ both tested in PostM...
- Modified
- 17 Feb at 08:19
How import WebApplicationBuilder in a Class Library?
I want to create an extension method for WebApplicationBuilder: ``` public static void AddData(this WebApplicationBuilder builder) { var connectionString = builder.Configuration.GetConnectionStrin...
ServiceStack ORMLite JSON Deserialization multiple levels
I've got a class containing a Dictionary like this: ``` Dictionary<string,object> Data ``` I put data on multiple levels into here, such as: ``` Data.Add("simple",4); Data.Add("object",new Dictionary...
- Modified
- 16 Feb at 09:50
AvaloniaUI - What is the proper way to inject ViewModels into Views using composition-root based DI system?
I am new to Avalonia/ WPF, Xaml and desktop development in general so please forgive and clarify any related misunderstandings I demonstrate. I will continue to study available documentation but I am ...
- Modified
- 5 Jun at 09:47