Unable to resolve service for type 'MediatR.IMediator'
I try to make .NET Core API with CQRS, but i cannot build it because of MediatR error: System.AggregateException: 'Some services are not able to be constructed (Error while validating the service des...
ServiceStack.Redis: PopRight / PopLeft missing, instead weirdly named methods?
I'm testing ServiceStack.Redis library, and at first, couldn't understand why I could not determine if I was doing pop left or pop right. At first, I only saw ``` redis.BlockingPopItemFromList("list1...
- Modified
- 22 May at 15:15
ServiceStack .NET standard libraries are missing the PublicKeyToken
I have a .NET framework website running on 4.7.2 that references the ServiceStack.Text library and I only have a reference to a .NET Standard project which itself references ServiceStack.Text as well....
- Modified
- 1 May at 05:5
How best to unit test a ServiceStack service that uses IServiceGateway to call other internal services
I've been following the guidelines here - [https://docs.servicestack.net/testing](https://docs.servicestack.net/testing) I'm trying to do unit testing rather than integration, just to cut down the le...
- Modified
- 30 Apr at 21:26
How to use System.Configuration.ConfigurationManager in .netstanard library for .net core and .netframework
I am migrating the .netframework 4.7.2 class library to .netstandard 2.0 library. ConfigurationManager is used in the .netframework class library to read the app settings. Any alternative option a...
- Modified
- 30 Apr at 17:22
Intercepting Fluent Validation
We are using fluentvalidation (with service stack) to validate our request DTO's. We have recently extended our framework to accept "PATCH" requests, which means we now have a requirement to apply va...
- Modified
- 1 May at 08:2
Why does Visual Studio add "-1937169414" to a generated hash code computation?
If you use Visual Studio's own refactoring menu to add a GetHashCode implementation to a class like this: [](https://i.stack.imgur.com/JavKJ.png) and select the only int property in the class: [](...
- Modified
- 30 Apr at 18:31
What's the difference between the Microsoft identity platform and ASP.NET Core Identity?
What's the difference between the [Microsoft identity platform](https://learn.microsoft.com/en-us/azure/active-directory/develop/) and [ASP.NET Core Identity](https://learn.microsoft.com/en-us/aspnet/...
- Modified
- 29 Apr at 18:39
How do I get ServiceStack DLLs (Not from Nuget)?
I'm a subscrption customer but I can't login to ServiceStack forum to ask question because of this message "Your account hasn't been approved yet. You will be notified by email when you are ready to l...
- Modified
- 29 Apr at 11:15
Password with special characters in connectionString
I need to connect to my Dynamics CRM 365 on premise instance from an ASP NET application. My problem is that the account for connection has a password like: T,jL4O&vc%t;30 ``` <connectionStrings> ...
- Modified
- 28 Apr at 18:7
Put file to URL with Http Utils as multipart form encoded
Is it possible to PUT a file with Http Utils as multipart form encoded? This is what I tried: ``` var response = $"{_baseUrl}{address}".PutBytesToUrl(File.ReadAllBytes(filePath), "image/jpeg", "*/*"...
- Modified
- 28 Apr at 09:47
In Unity, when should I use coroutines versus subtracting Time.deltaTime in Update()?
Below is a simple example of the difference I would like to highlight. Using coroutines: ``` public float repeatRate = 5f; void Start() { StartCoroutine("RepeatSomething"); } IEnumerator RepeatS...
- Modified
- 27 Apr at 17:13
Dependency Injection in .NET Core inside a class library
How can I inject one class into another inside a .NET Core library project? Where should I configure DI as it is done in StartUp Class ConfigureServices in API project?
- Modified
- 28 Sep at 15:25
when i use ServiceStack.OrmLite.SqlServer Db.Select<TableA> sometimes Result is TableB's rows or TableA's other rows
``` var user = Db.Single<User>(x => x.Id==1); if(user.Id!=1||user.Id==0) {logger.Error($"Incorrect result{user.Id}")} ``` can see any result in Log file. This problem has troubled me for a lon...
- Modified
- 27 Apr at 16:22
Get a Value from ActionResult<object> in a ASP.Net Core API Method
I try to get a value from `ActionResult<object>` in an ASP.NET Core API method. The API has a different controller. I try to use a method from controller B in controller A to return the result value...
- Modified
- 27 Apr at 07:52
How to change C# Language Version for all of the projects in my solution in one place?
I have a solution with 20 projects, I want to change the C# version for all of them to C# 7.3 Is there a way that I could change all project's version at one go? I know I can change the from Project...
- Modified
- 28 Apr at 20:57
C# 8.0 non-nullable reference types and options pattern
Tl;dr: C# 8.0 introduces [Nullable Reference Types.](https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references) I've found that using nullable reference types with the ASP.Net [Options Pa...
- Modified
- 25 Apr at 04:29
Serilog DI in ASP.NET Core, which ILogger interface to inject?
I've successfully configured Serilog in my ASP.NET Core application, only the DI part remains. Now I have two ILogger interfaces, one is `Serilog.ILogger` the other is `Microsoft.Extensions.Loggi...
- Modified
- 12 Jul at 22:20
ASP.NET Core- How to allow nullable [FromBody] object in controller method?
Let's say I have a simple controller with one POST method that accepts an object from its body. However, the presence of this object should be optional in the HTTP request body. I tried to implement t...
- Modified
- 5 May at 17:44
How to suppress Possible Null Reference warnings
I am playing with the nullable types in c# 8 and I found a problem that is bugging me. Suppose I have a method which takes a nullable parameter. When a parameter is null, I want to throw a specific Ex...
- Modified
- 23 Apr at 09:59
C# Convert ReadOnlyMemory<byte> to byte[]
Given [ReadOnlyMemory Struct](https://learn.microsoft.com/en-us/dotnet/api/system.readonlymemory-1?view=netcore-3.1) I want to convert the stream into a string I have the following code: ``` var bod...
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
I'm trying to install scipy via pip on my 64 bit ARMV8 board. I have already installed openblas which is required by scipy. So, no issues with that. When i gave `pip3 install scipy --trusted-host pypi...
- Modified
- 22 Apr at 12:59
.NET Core 3.1 - Dependency resolution failed for component - AWS Mock Lambda Test Tools
I create a new AWS Lambda .NET Core 3.1 project, then run it using AWS Lambda Test Tools, then I get this page as expected: [](https://i.stack.imgur.com/Usst9.png) However, if I install one of these p...
- Modified
- 20 Jun at 09:12
Error CS1503 - Cannot convert from Microsoft.Extensions.Configuration.IConfigurationSection to System.Action<>
I am getting an error: When I am using Configure with Bind(), it is working. ``` var bandConfig = new BandSettings(); Configuration.GetSection("BandSettings").Bind(bandConfig ); ``` But with t...
- Modified
- 21 Apr at 20:31
Error message "DevTools failed to load SourceMap: Could not load content for chrome-extension://..."
I'm trying to display an image selected from the local machine and I need the location of that image for a JavaScript function. But I'm unable to get the location. To get the image location, I tried u...
- Modified
- 31 Jan at 04:57