C# ASP.NET Core - SocketException: No such host is known
I am having issues which seem to be related calling a specific API asynchronously using `HttpClient` - the strange thing is that it doesn't happen all the time and can be solved by refreshing the page...
- Modified
- 24 Jan at 15:37
Querying Data in a System-Versioned Temporal Table in Entity Framework Core
We are implementing a solution to query a temporal table. When enabling a temporal table on SQL server for any table, SQL will automatically add a second table with extra “_History” at the end of the...
- Modified
- 15 Jun at 08:1
Running .net core project from another project
I have a solution that has 3 projects. Project2 needs Project1 to be running in order to function normally (Project2 call some Apis in Project1). ``` Solution |-- Project1 | |-- Program.cs | |-- ...
- Modified
- 28 Jun at 09:36
Why compiler throw error CS0165: Use of unassigned local variable?
I put the code below, and also uploaded to a online c# compiler: [jdoodle.com/a/1jww](http://jdoodle.com/a/1jww) the code can compile and run online, however, it doesn't compile in my local visual stu...
- Modified
- 27 Jun at 14:52
Repository is not clean. Please commit or stash any changes before updating In Angular 8
Error > Repository is not clean. Please commit or stash any changes before updating when i have updated from version 7 to Angular 8. Angular Guide for upgrade [https://update.angular.io/#7.0:8.0]...
- Modified
- 18 Sep at 09:40
Self-Contained ASP.Net Core Not Reading appsettings.json file
I wrote a ASP.Net Core application. Everything works fine when I run it on my dev machine. I have published and deployed it to my staging machine as a self-contained application. When running the app ...
- Modified
- 6 May at 06:6
Hide TabBar in Xamarin Forms Shell
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no e...
- Modified
- 31 Mar at 05:50
How can I create an instance of IConfiguration locally?
I'd want to ask how to create an instance of ASP.NET Core's Configuration, the same that's being created when I require it in Controller's constructor which knows about the `appsettings.json` file li...
- Modified
- 24 Jun at 08:40
What is the equivalent of Math.Round() with MidpointRounding.AwayFromZero in Delphi?
How do I use c# similar `Math.Round` with `MidpointRounding.AwayFromZero` in Delphi? What will be the equivalent of: ``` double d = 2.125; Console.WriteLine(Math.Round(d, 2, MidpointRounding.AwayFro...
AutoQuery/OrmLite incorrect total value when using joins
I have this autoquery implementation ``` var q = AutoQuery.CreateQuery(request, base.Request).SelectDistinct(); var results = Db.Select<ProductDto>(q); return new QueryResponse<ProductDto> { Of...
- Modified
- 23 Jun at 20:23
How to fix "JAVA_HOME environment references a directory" in unity3d
I have a problem showed on this screenshot: [](https://i.stack.imgur.com/WI6au.png) > Android ResolverJAVA_HOME environment references a directory (C:\Program Files\Java\jdk1.8.0_212) that does not co...
How do I test if Python is installed on Windows (10), and run an exe to install it if its not installed?
I need to run the 2nd command on windows cmd only if the 1st one fails, in another scneario, I want to open python setup after checking if it is installed or not. I used this command `python --ver...
How to create conda environment with specific python version?
I have `miniconda3` installed and since I would like to have an environment with python version 3.3.0, I create it via ``` conda create -n "myenv" python=3.3.0 ``` However when I activate the environ...
Disable SQL logging in ORMLite
How do I turn off SQL logging? I have NLOG registered like so: ``` LogManager.LogFactory = new NLogFactory(); SetConfig(new HostConfig { AddRedirectParamsToQueryString = true, DebugMode...
- Modified
- 21 Jun at 22:15
Why does this error occur when using SingleAsync?
Find if an item is duplicated. Expected: an exception to be thrown only if more than one item is found. but we get a different exception here? ``` try { // Find duplicate item ...
- Modified
- 20 Jun at 16:10
Unable to create an object of type 'DbContext'
When I try to run ``` dotnet ef migration add Init ``` I get error > Unable to create an object of type 'IdentityContext'. I know what caused the problem. I wanted to learn using message bus and...
- Modified
- 20 Jun at 13:30
Complement higher order function
I'm trying to write a complement function, such that when provided with a function `f`, it returns a function which, when provided with the same input as `f`, returns it's logical opposite. Having pu...
- Modified
- 20 Jun at 08:5
C# 8 switch expression with multiple cases with same result
How can a switch expression be written to support multiple cases returning the same result? With C# prior to version 8, a switch may be written like so: ``` var switchValue = 3; var resultText = strin...
- Modified
- 26 Nov at 00:34
How to return nested objects of many-to-many relationship with autoquery
Lets say I have 3 classes: ``` public class Book { [Autoincrement] public int Id {get; set;} public string Title {get; set;} [Reference] public list<BookAuthor> BookAuthors {get; ...
- Modified
- 19 Jun at 19:15
ServiceStack: async/await service handlers
I have read a few SO questions that touches in this question, even though many of them are several years old: There are no docs on docs.servicestack.net that mentions async/await at all, I just fin...
- Modified
- 19 Jun at 16:40
How to enable or disable authentication using config parameter or variable?
I would like to implement a switch in configuration that allows to enable (`windowsAuth=true`) or disable Windows authentication (`windowsAuth=false`), so it will be used as anonymous. How to achieve...
- Modified
- 19 Jun at 16:40
Invalid hook call. Hooks can only be called inside of the body of a function component
I want to show some records in a table using React but I got this error: > Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the foll...
- Modified
- 15 Sep at 20:14
Module not found error in VS code despite the fact that I installed it
I'm trying to debug some python code using VS code. I'm getting the following error about a module that I am sure is installed. ``` Exception has occurred: ModuleNotFoundError No module named 'Simpl...
- Modified
- 19 Jun at 00:15
"UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure." when plotting figure with pyplot on Pycharm
I am trying to plot a simple graph using pyplot, e.g.: ``` import matplotlib.pyplot as plt plt.plot([1,2,3],[5,7,4]) plt.show() ``` but the figure does not appear and I get the following message: ...
- Modified
- 18 Jun at 20:43
Does C# 8 support the .NET Framework?
In Visual Studio 2019 Advanced Build settings, C# 8 does not appear to be available for a .NET Framework project, only (as in the picture below) for a .NET Core 3.0 project: [](https://i.stack.imgur....
- Modified
- 12 Mar at 02:8