Float value changing while inserting via c# to db with servicestack ormlite
The value of a float variable while selecting from database 1.67 but if I insert the same value to the database with servicestack ormlite it turns to 1.66999995708466. There is no processing taking p...
- Modified
- 22 Jan at 05:45
Cannot connect to Redis installed on VirtualBox running Ubuntu from Windows 10
I've setup an Ubuntu image on VirtualBox on a Windows 10 host. On the Ubuntu guest I've installed Redis which runs on port 6379 (TCP) by default. I tried to follow the tutorial from youtube [https://...
- Modified
- 22 Jan at 03:59
Swagger UI for net core 3.1 api is very slow
I updated Our net core API application from 2.1 to 3.1, SwashBuckle.Asp.NetCore to 5.0.0. Here is my startup set: ``` public class Startup { public Startup(IConfiguration configuration) { ...
- Modified
- 12 Mar at 11:18
Returning IAsyncEnumerable<T> and NotFound from Asp.Net Core Controller
What is the right signature for a controller action that returns an `IAsyncEnumerable<T>` and a `NotFoundResult` but is still processed in an async fashion? I used this signature and it doesn't compil...
- Modified
- 5 May at 11:13
How to remove a dotnet runtime on Windows?
I've found the command `dotnet --list-runtimes` and it outputs (abbreviated) for me: ``` Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore...
- Modified
- 21 Jan at 11:31
Deserialize nested properties
I am using ServiceStack.Text to deserialize a response like so: ``` var obj = JsonObject.Parse(response); ``` The problem is that it only deserializes top level properties. I tried playing around ...
- Modified
- 21 Jan at 07:48
Refresh Token using Polly with Named Client
I have a policy that looks like this ``` var retryPolicy = Policy .Handle<HttpRequestException>() .OrResult<HttpResponseMessage>(resp => resp.StatusCode == HttpStatusCode.Unauthorized) .Wa...
- Modified
- 25 Sep at 06:50
VS Code IntelliSense not working for Unity3d
Problem: IntelliSense is not working for Unity specific methods and functions (i.e., `Update`, `FixedUpdate`, `Awake`, etc.). It does work, however, for non Unity specific methods (i.e., `IEnumerator...
- Modified
- 20 Jan at 20:35
Could not load dynamic library 'cudart64_101.dll' on tensorflow CPU-only installation
I just installed the latest version of Tensorflow via `pip install tensorflow` and whenever I run a program, I get the log message: > W tensorflow/stream_executor/platform/default/dso_loader.cc:55] C...
- Modified
- 27 May at 15:25
GroupBy in EF Core 3.1 / EF Core 5.0 not working, even for the simplest example
I'm updating an EF6.x project to EF Core 3.1. Decided to go back to basics and follow the example of how to set up relationships from scratch again. According to the official Microsoft documentation, ...
- Modified
- 7 Dec at 10:52
How to customize the login page of ASP.NET Core web application with Angular Individual user account authentication?
(Environment: Visual Studio 2019 v16.4.3) I create a new "ASP.NET Core Web Application" with the following options 1. ASP.Net Core 3.1 2. Angular 3. Authentication of Individual User Account (with ...
- Modified
- 20 Jan at 07:37
Servicestack GlobalRequestFilters populating additional user auth data into Jwt tokens
I want to add additional properties to the response when a user logs in. When calling [https://Servicestackservice/auth/credentials?userName=](https://Servicestackservice/auth/credentials?userName=)...
- Modified
- 21 Jan at 03:45
Visual Studio 2019 ignoring tab preference
I was programming in VS2019 this morning before going about my day. When I sat down in the evening to keep programming, I realized that it has suddenly been placing spaces instead of tabs! My preferen...
- Modified
- 20 Jan at 03:1
Set EventCallback<string> outside of a Blazor component?
I am building a Blazor ProgressBar demo, and I am attempting to move some code out of my Blazor component into a C# class called ProgressManager. This is so I can abstract the code and make the Progre...
How to pass null in body to endpoint within asp.net core 3.1
I have the following action within an asp.net core 3.1 controller ``` [ApiController] [Route("example")] public class MyExampleController : ControllerBase { [HttpPost("{id}/value")] public as...
- Modified
- 19 Jan at 19:27
"415 Unsupported Media Type" for Content-Type "application/csp-report" in ASP.NET Core
I have a content security policy that causes Chrome to post a report, but the action that receives the report returns "415 Unsupported Media Type". I understand this is because the post has a Content-...
- Modified
- 24 Apr at 00:2
Entity Framework (Core) - cascading delete
I’m using EF Core 3.1.1, but I believe this question applies to all versions of EF. It seems the EF has the ability to cascade delete - if it is enabled, and if the dependent objects are loaded in th...
- Modified
- 18 Jan at 06:59
Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time
I face the following error when adding the migration of database in .net core This is the error: [](https://i.stack.imgur.com/pm3dd.png) This is the code in `Startup`: ``` public void ConfigureService...
- Modified
- 9 Oct at 07:18
Why can't I convert from 'System.IO.StreamWriter' to 'CsvHelper.ISerializer'?
Trying to write the contents of people to a CSVfile and then export it, however I am getting a build error and its failing. the error is: `cannot convert from 'System.IO.StreamWriter' to 'CsvHelper.IS...
Is there a way to declare a C# lambda and immediately call it?
It's possible to declare a lambda function and immediately call it: ``` Func<int, int> lambda = (input) => { return 1; }; int output = lambda(0); ``` I'm wondering if it's possible to do so in one ...
How to use SFTP connection with key file using C# and .NET
I have a C# .NET project, where am trying to open an SFTP connection to a server and put a file to the server. I have SFTP , and (.pem file). I do not have a here. Please help me with something to ...
What do the size settings for MemoryCache mean?
In a controller class, I have ``` using Microsoft.Extensions.Caching.Memory; private IMemoryCache _cache; private readonly MemoryCacheEntryOptions CacheEntryOptions = new MemoryCacheEntryOptions() ...
- Modified
- 16 Jan at 17:2
How do I get a instance of a service in ASP.NET Core 3.1
I have a small project in .NET Core 2.0 and as Microsoft announced that would no longer support .NET Core 2.0 I tried to update the project to the latest version at this time is 3.1. But I had a hard ...
- Modified
- 16 Jan at 17:1
Is it possible to use gRPC with HTTP/1.1 in .NET Core?
I have two network services - a gRPC client and gRPC server. Server is written in .NET Core, [hence HTTP/2 for gRPC is enforced](https://learn.microsoft.com/en-us/aspnet/core/grpc/aspnetcore?view=aspn...
- Modified
- 16 Jan at 13:31
Maven dependencies are failing with a 501 error
Recently build jobs running in are failing with the below exception saying that they couldn't pull dependencies from and should use . I'm not sure how to change the requests from to . Could someon...
- Modified
- 20 Jun at 09:12