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
Redis Timeout optimization. Need suggestions
I am getting this exception -Redis Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use. I have ...
- Modified
- 4 Jun at 16:47
Value cannot be null when using join in OrmLite / Servicestack / Linqpad
When joining two tables I get `ArgumentNullException: Value cannot be null. Parameter name: key.` This happens after executing the query, change any line in Linqpad and execute again. ``` using (v...
- Modified
- 4 Jun at 16:37
Change routing in ASP.NET Core Identity UI?
I am using the new [Identity UI](https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.UI) package available since ASP.NET Core 2.1 was released. Using a newly generated MVC project, here are s...
- Modified
- 21 Apr at 09:3
How do I interpret Serilog configuration in ASP.NET Core 2.1?
For some reason, I find it very hard to understand what's going on with Serilog configuration. I have a web api with .NET Core 2.1 and installed `serilog.sink.logstash`. My startup has: ``` public vo...
- Modified
- 6 May at 05:53
.NET Core 2.1 - Regex in loop 200x slower than 2.0 (3x in simple benchmark)
I have the following regex: ``` var regex = new Regex( @"^ActiveMQ[\d\.-]*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); ``` It runs over ~10...
Identity in ASP.Net Core 2.1< - Customize AccountController
I have installed `ASP.NET Core 2.1` but even though I have created a new `ASP.NET Core Web Application` using `ASP.NET Core 2.1` with `Individual User Accounts` → `Store user accounts in-app` I can't ...
- Modified
- 18 Dec at 21:12
Dispose of Observable Items as they are generated
I have an `IObservable` that generates items that are disposable, and it will generate a potentially infinite number of them over its lifetime. Because of this, I want to dispose of the last item each...
- Modified
- 3 Jun at 18:40