How to disable caching for all WebApi responses in order to avoid IE using (from cache) responses
I have a simple ASP.NET Core 2.2 Web Api controller: ``` [ApiVersion("1.0")] [Route("api/[controller]")] [ApiController] public class TestScenariosController : Controller { [HttpGet("v2")] pub...
- Modified
- 15 Apr at 08:43
Cannot convert lambda expression to type 'ServiceLifetime' because it is not a delegate type on Asp.net core 2.2
Why do I get this error: > Cannot convert lambda expression to type 'ServiceLifetime' because it is not a delegate type [TokenAuthWebApiCore.Server] on this line of code: This is how I use it: I am th...
- Modified
- 6 May at 20:35
Find longest string in Datatable column
I would like to know If It's possible to create a "one-line" Linq to retrieve longest string value of specific Datatable column, meaning that all column data (numbers, dates,strings...) should be conv...
Failed to launch emulator: Error: Emulator didn't connect within 60 seconds
I'm unable to debug using VSCode for Flutter. I'm using Windows and I'm trying to use an Android emulator. I have attempted to reinstall Flutter, Android SDK and VSCode to fix the issue, as well as tr...
- Modified
- 31 Mar at 09:39
What's the recommended way to deal with leaked IAsyncDisposable instances?
I've been familiarizing myself with some of the things (that are planned to be) added in C# 8 & .NET Core 3.0, and am unsure on the correct way to implement [IAsyncDisposable](https://learn.microsoft....
- Modified
- 24 Oct at 07:3
Where did IMvcBuilder AddJsonOptions go in .Net Core 3.0?
I've just upgraded my ASP web API project from .`Net core 2.0` to `3.0`. I was using ``` services.AddMvc() .AddJsonOptions(options =>options.SerializerSettings.ContractResolver ...
- Modified
- 2 Dec at 10:58
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle
I am receiving this warning message in my chrome console for my react-native project. Do you have any idea why I am getting this? This is the complete message: > Require cycle: node_modules/react-na...
- Modified
- 13 Apr at 10:54
How To Solve KeyError: u"None of [Index([..], dtype='object')] are in the [columns]"
I'm trying to create a SVM model from what I found in github [here](https://github.com/reshu-b7/Sign-Language-Glove), but it keeps returning this error. ``` Traceback (most recent call last): File ...
Creating an Azure ServiceBus Queue via code
Apologies, I'm new to Azure. I created a service bus and queue via the Azure portal using this [tutorial](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal). ...
- Modified
- 17 Apr at 09:31
Adding pdfium.dll to visual studio
For the application that I am making, I need to make use of the Pdfiumviewer package, which in turn requires you to add Pdfium itself, which is made available by Google. There is a "tutorial" on how t...
Is it possible to set the Default Content-Type to "application/json;v=2.0"
Is it possible to set the Default Content-Type to "application/json;v=2.0". I say default because I'm using a HttpClient class and I use the DefaultRequestHeaders to set my proxies to default values. ...
- Modified
- 17 Mar at 05:56
Is there a way to avoid X-Frame-Options in a CEF Windows Chromium Desktop App?
I created a simple app using the suggested "app init", then I dropped a pre-compiled ReactApp in place. The app has a browser within it that uses an IFrame to host the navigated pages, but in some pag...
- Modified
- 12 Apr at 17:2
How to initialize .net Core ILogger or ILoggerFactory from .NET Framework and inject to a constructor in Class library
I am consuming a Class Library which is built using .NET Core. The Library has only one public class with a constructor accepting ILoggerFactory and another overloaded constructor accepting ILogger. B...
Assembly location for Razor SDK Tasks was not specified
My project fails to build on a build server. I recently added a new ASP.Net Core (2.2) MVC project with razor pages. The project and the rest of the solution target the .Net Framework 4.7.2. In Visua...
- Modified
- 11 Apr at 13:1
Removing element from SortedSet in C#
I'm trying to remove an element from a Redis Sorted list without success ``` public bool Delete(int id) { try { var redisManager = new RedisManagerPool...
- Modified
- 11 Apr at 13:3
go mod: cannot find module providing package
I am creating a go project with version 1.12.1. If I run `GOPATH="$(pwd)/vendor:$(pwd)" GOBIN="$(pwd)/bin" go clean` I get the following error: ``` can't load package: package github.com/marvincaspar...
- Modified
- 11 Apr at 14:1
How to fix 'Unable to determine the relationship represented by navigation property' error in Entity Framework
When I try to register a user on my .NET Core 2.1 website (using identity) I get the following error: > "InvalidOperationException: Unable to determine the relationship represented by navigation prope...
- Modified
- 12 Apr at 07:57
Uncaught Invariant Violation: Rendered more hooks than during the previous render
I have a component that looks like this (very simplified version): ``` const component = (props: PropTypes) => { const [allResultsVisible, setAllResultsVisible] = useState(false); const ren...
- Modified
- 10 Apr at 23:45
How to serialize Dapper row to json
**Question** We have a Dapper Row as a result from a Dapper Query, which I want to store as a json string in our database. Unfortunately, I can't seem to get that to work. So, let's start with some ba...
Get Child Component binded values in Parent Component in Blazor
Lets Say Child Component called cinput.cshtml is ``` <input type="text" bind="@username"> @functions{ string username; } ``` and Parent Component called pform.cshtml ``` <cinput></cinput> <input...
Conversion failed,when using AutoQuery in ServiceStack
I have the following AutoQuery function. ``` [Route("/cars/search")] public class SearchCars : QueryDb<Car, CarDto> { public List<int> EquipmentIds { get; set; } public List<int> Manufacturer...
- Modified
- 9 Apr at 20:27
How to fix No connection could be made because the target machine actively refused it 127.0.0.1:64527
I have an MVC application which depends on a web API application, I hosted the two on a shared hosting environment. API on the subdomain and MVC on the main domain the API is api.mydomain.com and the ...
- Modified
- 10 Apr at 04:5
AutoQuery with ResponseDTO in ServiceStack
I have created an AutoQuery function in my API with the use of the following code. ``` [Route("/cars/search")] public class SearchCars : QueryDb<Car, CarDto>, IJoin<Car, Equipment, Colour, FuelType...
- Modified
- 9 Apr at 19:39
Get request with multiple inputs in ServiceStack API
I am creating a endpoint that accepts multiple parameters. I was wondering what the proper way of doing this in ServiceStack is, as I know that the routes can be defined like this: ``` [Route("/Ca...
- Modified
- 9 Apr at 17:52
Shutdown .Netcore IHostedService as Console App
I have built Generic Host (IHostedService) in .netcore 2.2. I am running HostBuilder as RunConsoleAsync(). RunConsoleAync() will wait for Ctrl + C to close application. I want to close console app as ...