How do I call SQLitePCL.Batteries.Init().?
I am attempting to create an SQLite database for my application and have come across this error. > System.Exception: 'You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle packa...
- Modified
- 7 Jun at 22:39
How to implement Auth0 authentication in ServiceStack?
My setup consist of 3 components: Auth0, where I add users and manage their permissions. My front-end SPA web page, which serves as a shell for my API. My API, made with ServiceStack. Here's the aut...
- Modified
- 7 Jun at 15:10
ILoggerFactory vs serviceCollection.AddLogging vs WebHostBuilder.ConfigureLogging
I have typical logging requirement for my asp.net core 2.x app: - - - Now I see at least three different API's to configure the logging: 1. WebHostBuilder.ConfigureLogging()in Program.cs public ...
- Modified
- 7 Jun at 15:22
ASP.NET Core 2.1 - IdentityUser Issue - Cannot create a DbSet for 'IdentityUser' this type is not included in the model for the context
I have upgraded my code from ASP.NET Core 2.0 to Core 2.1. I created a new Core 2.1 project and moved my code into the new project. I have provided samples of my startup and `ApplicationDbContext` I ...
- Modified
- 7 Jun at 15:37
Ways to manage configuration in project with multiple tiers
ASP.NET Core project template comes with `appsettings.json` and `appsettings.Development.json` and it is added by default in [CreateDefaultBuilder](https://github.com/aspnet/MetaPackages/blob/dev/src/...
- Modified
- 11 Jun at 10:54
Why do I get a 404 trying to post a large file to a Core Web API
I am very new to file transfer between `HttpClient` and a Web API, so please excuse any ignorance and guesswork in my code. I have been trying to post a file created with `System.IO.Compression.ZipFil...
- Modified
- 14 Jun at 06:33
This version of Microsoft.AspNetCore.All is only compatible with the netcoreapp2.1 target framework
When I try to publish my application to the web server after upgrading to .NET Core 2.1 from 2.0, I get this message: "This version of Microsoft.AspNetCore.All is only compatible with the netcoreapp2....
- Modified
- 7 Jun at 02:1
Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0' exception when starting Stateful Service
I have created a new Service Fabric application in Visual Studio 2017 (version 15.7.1) and added a new service using the template. When I try to run the service it fails to start correctly and I can...
- Modified
- 6 Jun at 23:22
JsonServiceClient not including session cookies in API requests for subdomain - ServiceStack
Using the Typescript JsonServiceClient in an Angular app, the `ss-pid` cookie value keeps changing because JsonServiceClient is not including `ss-pid`, `ss-id` and `ss-opt` in requests to my APIs. Th...
- Modified
- 6 Jun at 21:55
Acceleration in Unity
I am trying to emulate acceleration and deceleration in Unity. I have written to code to generate a track in Unity and place an object at a specific location on the track based on time. The result lo...
- Modified
- 6 Jun at 20:29
Serilog and .NET Core 2.1 HostBuilder Configuration
I'm using the .NET Core 2.1 HostBuilder class to set up and run a GRPC server and am having trouble getting SeriLog properly configured so that it is used by the .NET Core logging pipeline as well as ...
- Modified
- 21 Oct at 00:53
EF CORE 2.1 HasConversion on all properties of type datetime
I previously used DateTimeKindEntityMaterializerSource ([Git](https://github.com/aspnet/EntityFrameworkCore/issues/4711)) to convert all DateTime to UTC when reading entities because the default was u...
- Modified
- 5 Sep at 11:56
Using Task.FromResult v/s await in C#
I am new to C# async programming and need to see if which of the following is a preferred way to deal with Task object. I have a class that does this: ``` var value = this.SomeFunction(...); var i...
- Modified
- 6 Jun at 18:5
What's the difference between APPINSIGHTS_INSTRUMENTATIONKEY configured by Azure and ApplicationInsights:InstrumentationKey?
There is some confusion in the Application Insight configuration. It can be configured in the application itself using Visual Studio and in the App Service using Azure Portal. # Visual Studio When ...
- Modified
- 14 Jul at 17:36
Creating an API endpoint in a .NET Windows Service
I have an ASP.NET project and a .NET Windows service running on the same machine, and I want them to communicate (currently only ASP.NET => Service one way). The most convenient way to do this (IMO) w...
Pattern to use Serilog (pass ILogger vs using static Serilog.Log)
In a new project where was chosen as the logger I automatically started passing around `ILogger` interface. The code accesses `Log.Logger` once and from then the classes that desire logging accept ...
Azure ServiceBus Message Serialization/Deserialization
I am using a .NET Core application to send an object through an Azure Service Bus Queue and have it received by a Web Job (.NET Core as well.) My question is how to serialize/deserialize to send/rece...
- Modified
- 27 May at 11:50
Persisting RefreshToken OnAuthenticated - ServiceStack
This question is related to this question here: "[Revoking Bearer Token and Refresh Token - ServiceStack](https://stackoverflow.com/questions/50690152/revoking-bearer-token-and-refresh-token-servicest...
- Modified
- 20 Jun at 09:12
ServiceStack OrmlLite Get Scalar output from Stored Procedure
How can I get the scalar output from Stored Procedure? When I execute the below statement, it returns DBNull. We are using ServiceStack.OrmLite 4.5.8 ``` var le = db.<<SP Name>>(param1, param2) ...
- Modified
- 6 Jun at 14:24
Publish .NET Core App As Portable Executable
I have a simple .net core app and publish it by following command: ``` dotnet publish -c Release -r win10-x64 ``` ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</Out...
- Modified
- 26 Nov at 10:16
Entity Framework Attach/Update confusion (EF Core)
As I understand, when "Update" is called, every property within a specific entity is modified. The "Attach" method, on the other hand, starts the entity off in the "Unmodified" state. Then, when an ...
- Modified
- 18 Apr at 14:57
How to use the ServiceBus EventData Offset Value
I have some code that uses the [Service Bus Event Data](https://learn.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.eventdata?view=azure-dotnet), and I suspect that I need to use the o...
- Modified
- 8 Jun at 07:25
Revoking Bearer Token and Refresh Token - ServiceStack
I want to enforce a single user session feature for my Angular app because my customers share a single account with their coworkers. The issue currently, with my implementation. is revoking a valid ...
- Modified
- 4 Jun at 23:39
How is HttpContext TraceIdentifier generated in .NET Core?
How is HttpContext TraceIdentifier (aka Correlation-Id) generated? I request a page through controller which gives me the following TraceId: `0HLEACIU86PT6:0000000D` The page fires an ajax call which ...
- Modified
- 21 Sep at 02:18
How to use the gRPC tools to generate code
I've read the tutorial and I'm able to generate the .cs file but it doesn't include any of my service or rpc definitions. I've added `protoc` to my PATH and from inside the project directory. `proto...
- Modified
- 4 Jun at 19:52