When using ServiceStack templates, is it possible to shape output of htmldump with attributes on dumped object?

The code below will output a html table with the values "Name" and "Age" in the first column. Is it possible to output something else like "Navn" for "Name" and "Alder" for "Age"? If so, how? I've tri...

28 Aug at 01:37

Different Minimum Level Logs Serilog

Is there a way to differentiate what level is logged between the different loggers for Serilog? I want to be able to log MinimumLevel Debug to the console output but only Warning and above to my file ...

Service Stack customize AutoQuery

We are using Service Stack in our project with great success and have a need to filter the results coming back from AutoQuery to those records we have marked as being not deleted. We soft delete data ...

27 Aug at 18:24

How to Throttle all outgoing asynchronous calls to HttpClient across multiple threads in .net Core API project

I'm designing a .net core web api that consumes an external api that I do not control. I've found some excellent answers on stack overflow that allowed me to throttle my requests to this external API...

UWP PDF printing

Is there a way to print PDF from UWP application? Other than rendering it as `png` or `BitmapImage`. I had look at Microsoft [printing sample](https://github.com/Microsoft/Windows-universal-samples/tr...

20 Jun at 09:12

Get wwwroot path when in ConfigureServices (aspnetcore)

In my aspnetcore app (v2.1) I need to configure a read-only database (entityframework core + SQLite) which is in ~/wwwroot/App_Data/quranx.db I need to call this code in Startup.ConfigureServices ``...

25 Oct at 18:3

Web api core returns 404 when adding Authorize attribute

I am new to .net core, and I am trying to create web api core which implements jwt for authentication and authorization purposes. Inside Startup class I configured it this way: ``` public class Star...

How do I get a reference to an IHostedService via Dependency Injection in ASP.NET Core?

# Details I have attempted to create a background processing structure using the recommended `IHostedService` interface in ASP.NET 2.1. I register the services as follows: ``` services.AddSinglet...

ServiceStack 5.1.0 does not deserialize object field

We have Web Client (Javascript) sending DTO containing field of type object and having some string inside. Server handles the string (there is some reason why the field is defined as 'object' and not ...

27 Aug at 08:5

How to inject dependencies inside an ASP.NET Core Health Check

I'm trying to use the new [ASP.NET Code 2.2 Healthchecks](https://blogs.msdn.microsoft.com/webdev/2018/08/22/asp-net-core-2-2-0-preview1-healthcheck/) feature. In this [link](https://blogs.msdn.micro...

Task has a wrong return type

What wrong? and how to fix??I'm trying to learn a new subject in c#-task. and when I run I got error message: `Error CS0407 'Task MainWindow.btn1_ClickAsync(object, RoutedEventArgs)' has the wrong ret...

26 Aug at 09:3

.NET core dependency injection to hosted service

My .net core app needs to crawl data in a specified time interval. I have chosen to implement `IHostedService` to run it in parallel with API. The hosted service needs some services injected. I regist...

How to add all projects to a single solution with dotnet sln?

Following examples from [here](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln) I'm trying to execute ``` dotnet sln AllProjects.sln add **/*.csproj ``` But I get this error: > Cou...

ASP.NET Core NullReferenceException when just accessing model

I am having trouble with attempting to create a view with a strongly typed model. No matter what I pass in as the model to a `View()`, I always receive a `NullReferenceException` when even just access...

DbProviderFactories.GetFactoryClasses returns no results after installing .NET SQL Client in .NET Core 2.1

I'm porting a library over to .NET Core 2.1 now that it has support for DbProviderFactory. For the most part it has gone fine - it compiles, but when run I get an error: > System.ArgumentException: '...

27 Aug at 16:19

execute stored procedure in entity Framework Core without expecting map to dbset

I am working on .NET CORE, Entity Framework core. I have stored procedure that I need to execute from .NET class. My stored procedure takes number of 'Context' and I don't know how to deal this, altho...

How to configure ServiceStack.Text to use EnumMember when serializing to csv or jsv?

This is a follow up question to my earlier question about [ServiceStack.Text and deserializing json to .Net enums](https://stackoverflow.com/q/51854666/10228027). The answer to that question resolves ...

How to manually mapping DTO WITHOUT using AutoMapper?

I'm learning C#.NET Core and trying to create DTO mapping without using AutoMapper as I'm working on a small project alone and want to understand fundamental before using extra packages, surpringly I ...

24 Aug at 09:18

ServiceStack.OrmLite: Support for sql native JSON types and indexing?

Our current data model has sub-objects, something like ``` BaseObject-->NodeStart-->SomeDateTime ``` and so on. In our current, custom implemented data handling, we "serialize" the complex objects ...

How can I clean (reset cache) of React Native using Expo. Not sure if it is cache issue

I am building a simple React Native app with create-react-native-app using only react-navigation and base-64(base 64 encode/decode) as dependencies. Over time starting the app became slower and now so...

24 Aug at 06:24

TypeError: Object(...) is not a function reactjs

I was trying to clean up this react component by extracting `fillCalendar()` from being a method of the component into it's own js file and importing it instead. Originally this.state.datesArray was s...

24 Aug at 04:26

How to integrate Python Code with C#.Net Core language?

Am trying to integrate python code in my .net core application for data analysis and some machine learning classification. How can I do this the best way? Note: I don't want to execute scripts with ...

10 Sep at 22:52

Consuming a custom stream (IEnumerable<T>)

I'm using a custom implementation of a `Stream` that will stream an `IEnumerable<T>` into a stream. I'm using this [EnumerableStream](https://gist.github.com/rdavisau/6e00bfe4a769ddc9338c) implementat...

26 Jul at 07:28

Possible .NET JIT call parameter lifetime bug?

I've been chasing down the cause of an intermittent crash in one of our .NET services due to an internal error in the .NET Runtime (exit code 0x80131506). The service in question doesn't perform any o...

24 Aug at 07:32

Getting general information about MongoDB collections with FSharp

Can I retrieve basic information about all collections in a `MongoDB` with `F#`? I have a `MongoDB` with > 450 collections. I can access the db with ``` open MongoDB.Bson open MongoDB.Driver open M...

23 Aug at 18:36