ILogger to Application Insights

Using `Microsoft.ApplicationInsights.AspNetCore v2.6.1` with .net core v2.2.2 I can see the telemetry going in Azure Application Insight Live Metric Stream but I don't see the entries which I'm trying...

EF Core 2.2 spatial type can't be added to db migration

I'm trying to build a database with a spatial object using EF core 2.2, and i'm getting a problem with trying to create the database migrations. using [https://learn.microsoft.com/en-us/ef/core/model...

.Net Core Integration TestServer with Generic IHostBuilder

I've updated my website with and I want to make with a TestServer. In .Net Core 2.2, I've been able to make it using `WebApplicationFactory<Startup>` Since `WebHostBuilder` is about to be deprecate...

ASP.NET Core Singleton instance vs Transient instance performance

In ASP.NET Core Dependency Injection, I just wonder if registering `Singleton` instances will improve performance instead of registering `Transient` instances or not? In my thinking, for `Singleton` i...

Managed vs. unmanaged types

I was [reading an article](https://learn.microsoft.com/en-US/dotnet/csharp/language-reference/keywords/sizeof) about how to use the `sizeof` operator in C#. They say: "Used to obtain the size in byte...

20 Feb at 15:55

Unable to send SMTP mails using office365 settings

I am using SMTP mail for sending mail using Laravel. Everything working perfect other than office365 mail settings. Settings I have used is as below: ``` SMTP HOST = smtp.office365.com SMTP PORT = 5...

20 Feb at 10:56

Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory \\METADATA

I relatively new to coding so I am not (yet) running virtual environments. Rather, I am just downloading packages with pip straight to my pc to run python 3.7 in atom. When I tried to use pip the oth...

20 Feb at 04:1

PowerShell bug “execution of scripts is disabled on this system.”

I have a power shell script that runs to stop services, 'stop / terminate process' , delete 2 files and then restart. I can run this script perfect on my Windows 10 64 Bit Host Machine - with ZERO is...

20 Feb at 16:49

How to debug into .NET framework source code

I would like to solve it without using any external tools (e.g. dotPeek as source server).

19 Feb at 20:35

Unable to find testhost.dll. Please publish your test project and retry

I have a simple dotnet core class library with a single XUnit test method: ``` TestLib.csproj: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramewor...

19 Feb at 16:26

IConfiguration does not contain a definition for GetValue

After moving a class through projects, one of the `IConfiguration` methods, `GetValue<T>`, stopped working. The usage is like this: ``` using Newtonsoft.Json; using System; using System.Net; using Sys...

Relationship between C# 8.0, NET Core 3.0 and Visual Studio

The article [Building C# 8.0](https://blogs.msdn.microsoft.com/dotnet/2018/11/12/building-c-8-0/) states > The current plan is that C# 8.0 will ship at the same time as .NET Core 3.0. However, the fe...

14 Jul at 03:15

ServiceStack Redis client Get<T>(key) removes quotes from string data

I am using ServiceStack.Redis library to work with Redis. To start with, I have implemented [this](https://www.codeproject.com/Articles/1120038/A-simple-Csharp-cache-component-using-Redis-as-pro) solu...

Cannot load System.ComponentModel.Annotations from OrmLiteConfigExtensions (ServiceStack.OrmLite.Core)

I get a runtime error when using `ServiceStack.OrmLite.Core` package (5.4.1) and trying to get a `ModelDefinition` (`ServiceStack.OrmLite.ModelDefinition`) by doing: ``` var model = ModelDefinition<T...

.NET Core include folder in publish

I have the following folder structure for my .NET Core 2.1 project: [](https://i.stack.imgur.com/rpKJc.png) How can I include folder `AppData` and all of its subfolders and files when I publish the ...

19 Feb at 09:35

How to use if-else condition on gitlabci

How to use if else condition inside the gitlab-CI. I have below code: ``` deploy-dev: image: testimage environment: dev tags: - kubectl script: - kubectl apply -f demo1 --record=true ...

19 Feb at 08:11

Servicestack Session is null only when using JWT

This fails on SessionAs in the baseservice in Postman when I authenticate via JWT. But when I use Basic Auth it works fine. Anyone know why? Apphost ``` Plugins.Add(new AuthFeature(() => new CustomU...

19 Feb at 05:51

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure after upgrading to ASP.NET Core 2.2

After upgrading my project to ASP.NET Core 2.2, I tried to run the application (locally of course) and the browser displayed an error message like in the below screenshot. [](https://i.stack.imgur.c...

19 Feb at 03:4

Error setting X509Certificate2 PrivateKey

I am migrating a .NetFramework 4.6.1 library to a .NetCore 2.2. But i am unable to set x509certificate.PrivateKey as shown below. I have read that may be due to the RSAServiceProvider but i am unaware...

5 May at 18:38

Why am I seeing net::ERR_CLEARTEXT_NOT_PERMITTED errors after upgrading to Cordova Android 8?

After upgrading to [Cordova Android 8.0](https://cordova.apache.org/announcements/2019/02/16/cordova-android-release-8.0.0.html), I am seeing `net::ERR_CLEARTEXT_NOT_PERMITTED` errors when trying to c...

12 Mar at 21:33

Where i should put my DTOs in clean architecture?

[](https://i.stack.imgur.com/LCRQQ.png) Need to implement the clean architecture and struggling with DTO concept. As I understand, i can't use my domain objects in presentation layer (asp mvc) inste...

18 Feb at 13:13

Uncaught TypeError: Cannot destructure property `name` of 'undefined' or 'null'

Object destructuring throws error in case of null object is passed ``` function test ({name= 'empty'}={}) { console.log(name) } test(null); ``` > Uncaught TypeError: Cannot destructure property...

Error installing geopandas:" A GDAL API version must be specified " in Anaconda

This error raised while installing geopandas. I've looking for its solution on the web, but none of them really explain what happened and how to solve it.. This is the full error: ``` Collecting geop...

17 Feb at 15:20

Self-referenced generic parameter

For example I have the following classes: 1. ``` class MyClass1 { public MyClass1 Method() { ... return new MyClass1(); } } class MyClass2 { public MyClass2 Method()...

17 Feb at 20:44

Formatting rule to have blank line between class member declarations

Micrsoft provides bunch of coding settings for EditorConfig [.NET coding convention settings for EditorConfig](https://learn.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-refe...

19 Feb at 05:45