C# .net core swagger trying to use Multiple API Versions, but all end-points are in all documents
We are trying to separate our API versions into different Swagger documents. We have configured everything as described in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore#generate-multiple-...
- Modified
- 2 Aug at 09:49
How to unpack msgpack record
I am using Redis and C#. I saved my user data in Redis with msgPack format. How can I deserialize msgPack data? I guess, some records are different from the current user model in Redis. I usually get ...
- Modified
- 13 Nov at 08:26
Upgrade ServiceStack with Castle.Windsor from 4.x to 5.7
We upgraded ServiceStack from v4.x to v5.7 for ASP.NET 4.5.2 In v4.x we used Castle.Windsor with PerWebRequst lifecycle. We updated it to LifestyleScoped. Error we recieved: Scope was not available. D...
- Modified
- 13 Nov at 04:59
NLog with Application Insights - logging exceptions as an exception instead of a trace
Currently I am using a .NET Core Web Application built using Service Stack. Logging is currently provided by using NLog, with Azure Application Insights as a target. Currently when I log messages and...
- Modified
- 1 Jan at 09:54
Blazor Component Reference Null on First Render
I have a custom component with an event Action called TabChanged. In my Razor page I set the reference to it up like so: ``` <TabSet @ref="tabSet"> ... </TabSet> @code { private TabSet tabSet;...
- Modified
- 13 Nov at 14:40
Service Stack [Required] Annotation does not work
I have a model and I have added a required annotation on it but it does not do anything. It does not throw any error. Do I have to add something to configuration to make sure annotations are fired. `...
- Modified
- 12 Nov at 19:48
Does ServiceStack 4 keep logs of the received HTTP request?
Is there any log file automatically created and maintained by the ServiceStack web server
- Modified
- 12 Nov at 16:43
ServiceStack RedisPubSubServer will enter in OnStop, OnInit, and OnStart frequently
Here is my situation: 1. I instantiate a RedisPubSubServer and configure it with OnInit, OnStart, and OnStop callbacks. 2. I keep this reference as long as the application lives and, in the end, I d...
- Modified
- 13 Nov at 13:54
Returning a custom HTTP response code when the authentication fails for a custom basic auth provider
I know that I can return a custom reponse when using a custom authentication provider like the code below: Return a custom auth response object from ServiceStack authentication I'm just wondering if...
- Modified
- 12 Nov at 15:12
Azure Function should log or throw exception on error?
I have Azure Function (Http trigger) that can fail. I also have Application Insights configured for it. In case of error (Which is better): 1. Catch exception, wrap with more info and rethrow it. (...
- Modified
- 12 Nov at 13:13
Automapper Object reference is required for the non static field, method or property
I recently Upgraded my .net core to 3.0 and Automapper from 6.2 to 9.0. Now the automapper is throwing the following compile time error when using mapper.map inside mapfrom function. ``` CreateMap<Do...
- Modified
- 11 Nov at 20:27
@attribute [AllowAnonymous] in Blazor server-side component has no effect
I have created a fresh Blazor server-side project with .NET Core 3.0 and have closed down the application for non-authenticated users. I am now trying to allow anonymous access to Index.razor compon...
- Modified
- 11 Nov at 15:56
C# 8 understanding await using syntax
I have next method: ``` public async Task<IEnumerable<Quote>> GetQuotesAsync() { using var connection = new SqlConnection(_connectionString); var allQuotes = await connection.QueryAsync<Quot...
- Modified
- 9 Apr at 16:7
System.Text.Json.JsonSerializer.Serialize returns empty Json object "{}"
Environment: Visual Studio 2019 16.3.8, .NET 3.0.100, .NET Core 3.0 unit test. All 3 calls below to System.Text.Json.JsonSerializer.Serialize return empty objects: "{}" I must be doing something wro...
- Modified
- 9 Nov at 23:35
ServiceStack - [Authenticate] attribute is called before request filters. Does not work with OrmLiteMultitenancyAuthRepository / OrmLiteCacheClient
I have a multitenant application with a schema per tenant postgres database The database contains the following schemas: ``` tenant_cf5f3518bd524c3797b884457b374e50 tenant_46255f07079046139f8c0f9429...
- Modified
- 9 Nov at 15:46
Restrictions on arguments to PathRelativePathTo in a "long path aware" environment
For a [long path aware](https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/) process on Windows 10, I'm trying to understand what the argument restrictions ...
TS2339: Property 'style' does not exist on type 'Element'
Here's the code: ``` const test = Array.from(document.getElementsByClassName('mat-form-field-infix')); test.forEach((element) => { element.outerHTML = '<div class="good-day-today" style="width: 0...
- Modified
- 8 Nov at 20:52
Performing a health check in .NET Core Worker Service
How can I implement health checks in a .NET Core Worker Service? The service will be run inside Docker and needs to be able to check the health of the service.
How do I generate .proto files or use 'Code First gRPC' in C#
I want to use gRPC with .NET in an asp.net core web application. How do I generate the necessary .proto file from an existing C# class and model objects? I don't want to re-write a .proto file that mi...
- Modified
- 12 Jan at 20:40
The AsyncTask API is deprecated in Android 11. What are the alternatives?
Google is deprecating Android AsyncTask API in Android 11 and suggesting to use `java.util.concurrent` instead. you can check out the commit [here](https://android-review.googlesource.com/c/platform/f...
- Modified
- 12 Jan at 09:41
Nuget package creation - Class library that targets .NET framework 4.6.1 can not target correct framework
I created a class library that targets .net framework 4.6.1 (so pretty much a blank canvas, with a single method to return a string, just for testing purposes). I want to make this into a nuget packag...
- Modified
- 8 Nov at 15:31
Object Oriented Programming - how to avoid duplication in processes that differ slightly depending on a variable
Something that comes up quite a lot in my current work is that there is a generalised process that needs to happen, but then the odd part of that process needs to happen slightly differently depending...
Cannot install dotnet-ef tool on Windows 10
I'm trying to install the `dotnet-ef` tool via the dotnet-cli. The command that I enter: `dotnet tool install --global dotnet-ef` I gives me the following error: ``` The tool package could not be r...
- Modified
- 8 Nov at 10:1
CMD opens Windows Store when I type 'python'
Today when I tried to run simple code on Sublime Text 3, the following message appeared: > Python was not found but can be installed from the Microsoft Store: [https://go.microsoft.com/fwlink?linkID=2...
- Modified
- 17 Jun at 22:55
How to set basepath for openapi with servicestack?
The REST endpoints of my application all start with /api/. The swagger-ui lists all REST pathes under /api/, which is a mess. I want to set the basepath to /api/, so that only the REST endpoints are ...
- Modified
- 7 Nov at 19:48