Azure Search: price range - min & max value calculation
Currently, I am trying out Azure Search SDK. Having a strong background working with [lucene](https://lucenenet.apache.org/) and [bobobrowse](https://github.com/NightOwl888/BoboBrowse.Net), the Azure ...
- Modified
- 3 Mar at 04:49
Decimal and mathematical operations
I have a simple conversion of a `decimal` in C#. It looks like this: ``` private decimal BaseValue { get; set; } public decimal ConvertedValue { get { return BaseValue * (365 / ...
Method not found System.Net.Http.Formatting.MediaTypeFormatter.get_SupportedMediaTypes() after adding .NET Standard 2.0 dependency
I have a .NET Framework 4.6.1 WebApi project that is referencing a small NuGet package we use internally to share common utility methods. We want to start moving some of our stuff to .NET Core, so I ...
- Modified
- 20 Sep at 12:57
ASP.NET Core 2 Unable to resolve service for type Microsoft EntityFrameworkCore DbContext
When I run my asp.net core 2 projects I get the following error message: > InvalidOperationException: Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContext' while attempting to ...
- Modified
- 20 Sep at 11:1
EntityFramework Core 2.0 - Add Migration error "The EntityFramework package is not installed"
*I'm getting an error when trying to Add-Migration for Entity Framework Core, to a Code First project, here are the details...* I have created a new ASP.Net Core web project (Core 2.0 in VS 2017)...
- Modified
- 2 May at 08:15
How Do I Clear The Credentials In AWS Configure?
I have deleted the [AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) in `sudo nano ~/.aws/config`. But, the credentials are still in [aws configure](https://...
- Modified
- 2 May at 04:14
How to get access token from httpcontext using owin and Mvc 5
I've got a IDP implemented in [IdentityServer 4](https://identityserver4.readthedocs.io/en/release/). My web app client(implemented in Mvc 5) authenticates with the IDP but now I need to get the acces...
- Modified
- 20 Sep at 10:4
Add Reference to dll vs. adding a NuGet package in .NET Standard project
I have a .NET Standard 2.0 project in my solution and I am using the IConfiguration interface. When I write the name VS suggest that I reference Microsoft.Extensions.Configuration.Abstractions.dll. If...
- Modified
- 20 Sep at 09:55
Asp.Net core "remember me" persistent cookie not works after deploy
I've built an MVC Core (Framework) application and I use Identity to login. When I click "Remember me" option all is ok on my develop machine, but after deploy on server machine, "remember me" doesn't...
- Modified
- 21 Sep at 06:54
Fixing Xcode 9 issue: "iPhone is busy: Preparing debugger support for iPhone"
I'm looking for more information on the message below. Xcode 9 seems to be hanging for a couple minutes already... > .Alex’s iPhone is busy: Preparing debugger support for .Alex’s iPhone Xcode will c...
Xamarin Forms - negate bool binding values
I am learning the xamarin forms and mvvm pattern. I am wondering, if is it possible to negate binding bool value. What I mean is: I have, let's say Entry with isVisible Binding: ``` <Entry x:Nam...
- Modified
- 20 Sep at 23:1
iPhone X / 8 / 8 Plus CSS media queries
What are the CSS media queries corresponding to Apple's new devices ? I need to set the `body`'s `background-color` to change the X's safe area background color.
- Modified
- 20 Sep at 05:2
Automapper Profiles not being loaded in Startup?
I'm using: - - It seems my profiles are not being loaded, every time I call the mapper.map I get Here my Startup.cs class ConfigureServices method ``` // This method gets called by the runtime....
- Modified
- 19 Sep at 21:55
How to create a POST request properly using ServiceStack for C#
I have an API which contains the following bit. It is supposed to receive a `Person` object. ``` [HttpPost] public IActionResult Post(Person person) { ... } ``` I also have a consumer for this ...
- Modified
- 20 Sep at 22:32
Visual Studio Community 2015 debugger ends at conditional breakpoint with "Evaluation of native methods is not supported" - how do I fix?
I have a conditional breakpoint and the condition checks the value of a string and stops if it's true. It stops but then a window opens saying: `The condition for a breakpoint failed to execute ... T...
- Modified
- 19 Sep at 14:43
Chr(34) equivalent
I am converting `VB.NET` code to `c#` and I am stopped when I reached the following code snippet. I need someone's help to convert Chr(34). Please help me to convert it to `c#`. ``` Dim inputStri...
Sharing secret across namespaces
Is there a way to share secrets across namespaces in Kubernetes? My use case is: I have the same private registry for all my namespaces and I want to avoid creating the same secret for each.
- Modified
- 9 Jun at 06:34
LoggerFactory Generates InvalidOperationException
I've created a console application using Microsoft.Extensions.Logging that uses a service layer. ``` public static void Main(string[] args) { // Create service collection var serviceCollectio...
- Modified
- 11 Jan at 17:18
.NET Core IssuerSigningKey from file for JWT Bearer Authentication
I am struggling with the implementation (or the understanding) of signing keys for JWT Bearer Token authentication. And I hope somebody can help me or explain me what I am missunderstanding. The last...
- Modified
- 26 Feb at 07:47
When is it more efficient to pass structs by value and when by ref in C#?
I've researched a bit and it seems that the common wisdom says that structs should be under 16 bytes because otherwise they incur a performance penalty for copying. With C#7 and ref return it became q...
- Modified
- 7 Mar at 18:4
Set cookies for cross origin requests
How to share cookies cross origin? More specifically, how to use the `Set-Cookie` header in combination with the header `Access-Control-Allow-Origin`? Here's an explanation of my situation: I am att...
- Modified
- 11 Feb at 20:34
How to pass some data through signalR header or query string in .net core 2.0 app
Using signalR in .net 4.7 we were able to pass two variables from the client application to signalR server. Here is the code snippet: ``` public class MyHub : Hub { protected (string myVar1, stri...
- Modified
- 2 Oct at 07:30
ServiceStack Json deserialization error
Here is the code of my .net core 2.0 console app: ``` using ServiceStack; using System; using System.Collections.Generic; namespace ConsoleApp1 { class Program { static void Main(...
- Modified
- 18 Sep at 11:10
XMLHttpRequest blocked by CORS Policy
I add an API with following script in let's say [http://www.test.com](http://www.test.com): ``` <script src="http://apiendpoint.com/api/v1/api.js"></script> <div id="api" data-apikey="LA59CJI9HZ-KIJ...
- Modified
- 16 Jun at 18:55
How To design configurable field level permissions with Entity Framework
Say we have a table of information pertaining certain models of cars, such as the following: [](https://i.stack.imgur.com/Oz7g2.png) How would I best implement field level access permissions for read...
- Modified
- 25 Sep at 05:56