BrowserStack: Unexpected error. Authorization required
I have two simple tests that are using `RemoteWebDriver` with `ChromeOptions` and `EdgeOptions`. Both these tests are using common code to set capabilities, including the `browserstack.user` and `brow...
- Modified
- 21 Oct at 23:0
ASP.NET API Exception after using ServiceStack.OrmLite.SqlServer.Converters
I wanna use SqlGeography for its benefits in sql server 2016 and I have Visual Studio 2017 while using servicestack 4.5.14 and ormlite. First and foremost I want to have SqlGeography as data type for...
- Modified
- 6 Sep at 13:52
How to do DI in asp.net core middleware?
I am trying to inject dependency into my middleware constructor as follows ``` public class CreateCompanyMiddleware { private readonly RequestDelegate _next; private readonly UserManager<Appl...
- Modified
- 8 Jan at 22:10
How do I prevent StyleCop warning of a Hungarian notation when prefix is valid
I have the following code: ``` var fxRate = new FxRate(); ``` which is giving me the following [StyleCop ReSharper](https://github.com/StyleCop/StyleCop.ReSharper) warning: > The variable name 'fx...
- Modified
- 6 Sep at 11:18
HttpClientFactory - Get a named, typed client by its name
HttpClientFactory offers the following extension method: ``` public static IHttpClientBuilder AddHttpClient<TClient>(this IServiceCollection services, string name) ``` and I've created a typed Http...
- Modified
- 6 Sep at 10:47
Why Logging doesn't use string interpolation
I have been following [Logging in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1) Which is working just fine. I have a question about this line...
Unexpected double WHERE clause in Servicestack OrmLite
We have an issue that occurs at every method call for limited periods of time. Then it works as expected. The issue is that the code produces double WHERE clauses. We're using Servicestack The meth...
- Modified
- 6 Sep at 07:53
WSL Redis encountered System has not been booted with systemd as init system (PID 1). Can't operate
I'm trying to follow the Redis installation process that was discuss in this [article](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04) of digital o...
- Modified
- 17 Feb at 02:21
Changing the Base Address of a HttpClient
When writing an application that uses HttpClient I have the same approach as [this post](https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/), in other words and instead use a static HttpC...
- Modified
- 6 Sep at 03:10
How can I fix git commit error "Waiting for your editor to close the file..." with VS Code?
I'm trying just `git commit` and Git is giving this message: > hint: Waiting for your editor to close the file... /c/Users/AGT/AppData/Local/Programs/Microsoft VS Code/bin/code: line 28: /Code.ex...
- Modified
- 18 Sep at 04:37
The explicit binding redirect conflicts with an autogenerated binding redirect
I am receiving the following warning when I build my solution: > The explicit binding redirect on "Microsoft.Azure.Documents.Client, Culture=neutral, PublicKeyToken=31bf3856ad364e35" conflicts with a...
- Modified
- 5 Sep at 23:46
Using cookies in ASP.NET Core 2.1
I have a simple ASP.NET Core 2.1 application which is supposed to set and then read a cookie. Whenever I try to read the cookie it returns null. Looking further in the browser's inspect tool I am una...
- Modified
- 10 Jan at 00:9
'Migrations' does not exist in the namespace 'Microsoft.EntityFrameworkCore'
I'm doing a ASP.NET Core project. I've installed `Microsoft.EntityFrameworkCore` and `Microsoft.EntityFrameworkCore.Tools` NuGet packages. I ran `Add-Migration InitialCreate` command, Which created `...
- Modified
- 5 Sep at 18:20
OrmLite doesn't apply soft delete filter on joins
I've added a `SqlExpressionSelectFilter` to use the [soft delete](https://github.com/ServiceStack/ServiceStack.OrmLite#soft-deletes) functionality in ServiceStack OrmLite. However, It only seems to ap...
- Modified
- 5 Sep at 17:21
C# access unmanaged array using Memory<T> or ArraySegment<T>?
With the introduction of `Memory`, `Span` and `ArraySegment` in C# 7.2, I was wondering if I could represent an unmanaged array as an enumerable object, that lives on the heap. This latter requiremen...
- Modified
- 5 Sep at 17:18
How to test if a user has a role within a service implementation in ServiceStack
I know I can add the RequiresAnyRole or RequiresRole attribute on my service: ``` [RequiresAnyRole("Admin", "HeadChaperone")] public GuestChaperoneResponse Delete(DeleteGuestChaperone request) ...
- Modified
- 5 Sep at 16:7
How to get intellisense in Visual Studio Code for Unity functions names?
I am following a tutorial about Unity and I see that the instructor has intellisense when writes the method's name. However I have only intellisense with classes and variables, I mean Unity classes l...
- Modified
- 5 Sep at 16:10
Unable to resolve service for type 'System.Net.Http.HttpClient'
I created a `ViewComponent` class which call a `REST API` using the `HttpClient`, this is the code: ``` public class ProductsViewComponent : ViewComponent { private readonly HttpClient _client; ...
- Modified
- 5 Sep at 14:50
In ASP.NET Core read JWT token from Cookie instead of Headers
I am porting an `ASP.NET Web API 4.6 OWIN` application to `ASP.NET Core 2.1`. The application is working based on `JWT` token. But the token in passed via cookie instead of header. I'm not sure why he...
- Modified
- 5 Sep at 13:9
How to set default value in material-UI select box in react?
I am using [Select box](https://material-ui.com/demos/selects/) from material-ui I want to show "select the value" option by default selected but after that user is not able to select this option. ...
- Modified
- 22 Feb at 03:6
Unable to consume WCF WSHttpBinding in .net core
I'am trying to move my project from .net to .net core. I was initially using WCF WSHttpBinding service in .net but I'am unable to consume the same in .net core. I tried using BasicHttpBinding to conne...
- Modified
- 6 May at 20:37
How to extend DbContext with partial class and partial OnModelCreating method in EntityFramework Core
I'm using EF Core and DatabaseFirst approach. My dbContext is created automatically by `Scaffold-DbContext` command. I need to add some new DbSets into a dbContext and add into `OnModelCreating` metho...
- Modified
- 25 Sep at 18:3
Do I need to call SaveChanges when using EFCore.BulkExtensions
I started using EFCore.BulkExtensions for ef bulk operations, and it is working very nice. (see https://github.com/borisdj/EFCore.BulkExtensions/) do I need to call also to SaveChanges: or this is goo...
- Modified
- 17 Jul at 08:28
High-performance TCP Socket programming in .NET C#
I know this topic is already asked sometimes, and I have read almost all threads and comments, but I'm still not finding the answer to my problem. I'm working on a high-performance network library tha...
- Modified
- 11 Apr at 05:20
Fluent Validation chain rule not working with multiple When conditions
I got a really interesting behavior. I have the two test cases below: On my validator, if I have the following, the first test fails and the second passes. If I change the order of the rules, the firs...
- Modified
- 6 May at 20:38