Questions tagged [.net-core]

.NET Core is an open-source successor of the .NET Framework. It can be used in a wide variety of applications and verticals, ranging from servers and data centers to apps and devices. .NET Core is supported by Microsoft on Windows, Linux and macOS.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

dotnet run --project <PATH> not taking project path as working directory

When using the .NET commands to run my Console App that is being stored on a network drive it sees the Working Directory as where it is being called from instead of the project path.. dotnet run --...
0
votes
0answers
9 views

Can't use the <component /> tag helper on a Razor Page?

I'm using DotNetCore 3.1 and Razor Pages. I want to use a Razor Component I created on the Index.Razor page, but have it use the 'Static' rendering mode. According to the documentation: To ...
0
votes
0answers
6 views

How to exclude an enum property of a Model from using the JsonStringEnumConverter which is universall set at the Startup?

I am developing the ASP.NET Core Application using the latest .NET Core 3.1.1 and System.Text.Json which was previously using the Newtonsoft.Json. As recommended in the Microsoft Migration guide I ...
0
votes
0answers
5 views

System.Net.Http.HttpRequestException on download multiple files from Azure Datalake V2

I am downloading a large amount of files >1000 from Azure Datalake V2 and I am continuously getting exception: The SSL connection could not be established, see inner exception. <--- Unable to ...
0
votes
0answers
35 views

Unable to connect to DATABASE while using command Update-Database

So, let me explain the problem a bit. I have installed MYSQL server and created a new connection and a database MYSQL SERVER And i can connect with no error: Connection no error Then i used the "...
0
votes
0answers
13 views

.NET Core Data Protection across multiple applications hosted separately

I'm planning on creating a new web-hosted form in which users will be inputting sensitive personal data. I wish to store this in a SQL Server database. This data needs to be accessible by various ...
0
votes
0answers
42 views

How to make a piece of data available for other functions further down the call stack?

For some specific Logging requirement, I would like to generate a variable, maybe an GUID that let me identify that function. Then, I would like to access that variable in another function down the ...
1
vote
0answers
55 views

Calculating a calls per minute metric?

In .NET core I'd need to calculate a perf metric such as call per minute and was looking for a library or something as simple as a class that would efficiently do the work but my searching ...
0
votes
0answers
10 views

Incompatible units: 'rem' and 'em' upon webpack

I've the following installed: node-js v10.15.3 npm 6.4.1 webpack 2.5.1 I'm getting the following error on running webpack for my dotnet core application: ERROR in ./ClientApp/app/assets/scss/styles....
0
votes
0answers
10 views

What is the best solution to receive HTTP JSON Request in a PRISM WPF application context?

I´ve migrated a Prism WPF Application to .NET Core 3.1 but one project uses a WCF-Service which receives Http-Json-Post-Requests and I wasn´t able to find an alternative working in .NET Core 3 or ....
0
votes
0answers
12 views

Add additional appsettings.Environment.json under the appsettings.json file [duplicate]

When I am creating a new ASP.NET Core project in Visual Studio, it creates for me some appsettings.json and also appsettings.Development.json. They look like below: If I am adding these files in a ...
0
votes
1answer
20 views

How to use MOQ in crud operations

I am having the a typical CRUD operation interface (repository) and i was wondering how would someone test it using MOQ. Model public class Model { public int Id{get;set;} } Interface public ...
0
votes
2answers
64 views

Task without async/await in controller action method

So I have a question about Task and async/await operation. I have a method like this: public Task<IActionResult> PostCompleteFormModel(string name, [FromBody]IndicatorFormApi apiModel, Guid ...
0
votes
0answers
17 views

Dotnet core code sample for using DescribeInstancesAsync for getting AWS EC2 instance data

I've used the AWS sample project with .NET Framework 4.6.1 and that had a DescribeInstances method which worked. When trying to move the sample code to ASP.NET Core I find that I have to use ...
2
votes
0answers
51 views

Attempting to migrate the .net core projects from 2.2 to 3.1

Trying to migrate the projects from .net core 2.2 to 3.1. In local debug the whole application works correctly. I've tried to publish my application on IIS. After publishing I go to the site url and ...
0
votes
0answers
10 views

Unable to retrieve Key Vault Secret from Docker App Service in .NET Core

I'm running a Web API that use NET Core 3.1 from Azure App service in a docker container, and struggling to obtain a secret key from Key Vault Service. My code looks fine, y get no errors but the ...
-2
votes
0answers
19 views

modal in javascript when moving mouse [closed]

I am developing a project with .net core. Considering the time that the user waits motionless with the session structure, I enable him to log in again if he is motionless for a certain period of time. ...
-1
votes
1answer
41 views

Can't use AutoMapper to map to null value

public class TestNullableString { public string? Test; public TestNullableString(string? test) { Test = test; } } public class TestNonNullableString { public string Test; } ...
0
votes
2answers
47 views

EF core 3.0 Identity column and ValueConverter

This my entity: public class Audit { public string Pk { get; set; } public string TableName { get; set; } public string RowPk { get; set; } public string ActionType { get; set; } ...
0
votes
2answers
25 views

How to execute a dynamic list of async functions in a sequential way?

I have refactored a Web API to rely on async/await in ASP.NET Core 3.1 and I have the following scenario: a statistics method is sequentially computing a list of indicators which are defined in a list....
0
votes
0answers
6 views

libssl error while running aspnet core 3.1 on centOS 7

I am trying to deploy and run a aspnet core 3.1 Api project to linux(CentOS 7) and got the following error. Cannot get required symbol EC_KEY_set_public_key_affine_coordinates from libssl Aborted (...
0
votes
1answer
33 views

How to run ildasm on .Net core exe/assembly?

I'm trying to run ildasm (Intermediate Language Disassembler) installed as part of Visual Studio 2019 against .NetCore3.1 console app. Use Developer command prompt of Visual Studio 2019 and run ...
1
vote
0answers
30 views

Creating RPN calculator using c#.NET with expression trees

I am new to expression trees and haven't done c# in a while now. I need to create reverse polish notation calculator using expression trees. So far I have created 2 stacks one is for operations and ...
0
votes
0answers
18 views

how to use Microsoft.Extensions.Caching.Redis with Multiple connection?

I'm using Azure Cache for Redis with nuget package Microsoft.Extensions.Caching.Redis. Here is Startup.cs services.AddDistributedRedisCache(o => { o.Configuration = Configuration....
0
votes
1answer
36 views

.NET Core Tasks not working on OpenVM virtual server

I noticed that .NET Core 3 Tasks are not working on my Ubuntu 18.04 based virtual servers (the providers are Strato.de and HostEurope.de). Here is a very basic test program: static void Main(string[]...
0
votes
0answers
15 views

Migration from .net core 2.2 to 3.1 - api 404 error

I develop a SPA with .net core at server side (and Angular for the clients). After migration from .net core 2.2 to 3.1 the api systematically responds with error 404. I have no clue where to get into ...
0
votes
0answers
30 views

Validation of Date in C# with correct Error Messages

I try to validate only the Date of a DateTime by using .NET CORE MVC 2.1! I have several problems during this validation process. Here you can see my code: [DisplayFormat(DataFormatString = "{...
-2
votes
0answers
32 views

separating system.drawing code from my system.forms code - what to consider [closed]

I am currently working on a legacy Winforms project written VB.NET. It definitely has a future and right now I am beginning to separate the System.Drawing code from the UI (System.Windows.Forms) code ...
1
vote
1answer
14 views

Exclude NuGet package based on custom property value in MSBuild file

I'm building a C# solution that has multiple projects and a Directory.Build.props file at its root with the following content: <Project> <PropertyGroup> <IsRelevantProject>...
0
votes
1answer
23 views

.NET Core UserManager CreateAsync leaves UserName/Email/PhoneNumber always null

NET Core application implementing a custom IdentutyUser logic for some extra fields. I have managed to create a user using CreateAsync but the fields UserName, Email and PhoneNumber are always ...
0
votes
0answers
15 views

Google Cloud ASP.NET Core application

I'm trying to deploy my app on netcoreapp3.0 to Google Cloud Platform using Google Cloud CLI but there is error: No valid .NET Core runtime version found for the app or it is not a supported app. As ...
0
votes
3answers
53 views

Fail to execute “dotnet tool restore --interactive” in Build Pipeline when using Azure DevOps Artifact

I'm using Azure DevOps and would like to run dotnet tool restore --interactive in my Build Pipeline. In my code repo, there is nuget.config as follows. The file has a private feed hosted in Azure ...
-1
votes
1answer
32 views

PostAsJsonAsync() not working in .Net Core 3.1 when updated my project from .Net Core 2.2 to 3.1 (Missing Assembly) [duplicate]

I have Update my Dot Net Core project from 2.2 to 3.1. It is an MVC project, I have called my .net core API from my MVC project and all of my post method calls gives an error. Here is the error: '...
0
votes
0answers
36 views

Foreign key contraint is incorrectly formed

In my .NET core 3.0 application, i'm trying to add a field with a constraint to my overridden ApplicationUser entity (overridden from IdentityUser). My database is a MySql database. My models look ...
0
votes
0answers
15 views

Swagger Authorization bearer not send

I'm using Swagger Swashbuckle in a dotnet core 3.1 web api project and have trouble to send bearer authorization to the requests calls. I've defined this in my ConfigureServices method: ...
0
votes
0answers
24 views

Camel-case a JObject during Serialization using the Entity Configuration

I've been trying to serialize a JObject to have camel-cased keys instead of the default pascal-case when persisted to the database. I wanted to hide the serialization in the entity configuration, but ...
0
votes
0answers
16 views

Adding scopes with Gmail API needs verification but Its a console app

I am working on a console app that uses the Gmail API and I need to use some restricted scopes, the problem is when it asks me to verify my project it wants me to provide a website that I don't have ...
0
votes
1answer
18 views

Getting windows gmail notifications on my app

I am building an app that uses the Gmail API that will run as a windows service, get Gmail notifications when a new email has arrived, do some functionality with that email and then mark it as READ. ...
0
votes
1answer
36 views

How to do Azure AD groups authorization in .Net core web API?

Net core web application. I am trying to implement groups based authorization in my .Net core app. I am trying to call groups from Microsoft graph. I have some confusion here. Below are the steps. ...
0
votes
1answer
18 views

Add SSL Cert to Net Core application in Windows VPS

So, I currently have a net core web api running in a windows VPS (amongst other things). When I make requests to this api, I would like to do so using https. It seems I need to have an SSL Cert on ...
0
votes
1answer
37 views

C# Azure ServiceBus / Azure SQL - works locally, does not seem to work when deployed to Azure

Just starting to work with Azure. Have a simple C# .NET Core app, which connects to Azure ServiceBus, reads messages, and writes them to Azure SQL database. Works locally just fine - connects to ...
1
vote
2answers
33 views

Systemd service fails at http request

I have .NET Core 3.1 executable, compiled as framework dependent / portable. I'm running it on a CentOS server, with the .NET Core Runtime installed. The application works completely fine when ...
0
votes
2answers
34 views

Trouble adding images to C# WPF .NetCore WPF application

With the intention of exercising I wanted to add an image to the UI of an WPF .NetCore application. In order to do this I use the following code in my XAML. <Image Source="images/myimage.png" ...
0
votes
0answers
17 views

Debug .NET Core 3.1 Lambda Locally with Visual Studio

How do we debug a .NETCore 3.0/3/1 Lambda (Assuming I have an SQS or an S3 event processor) locally. The .NET Core 2.1 version has a mock tool. How do we debug the .NET Core 3.0 with a mock tool?. ...
1
vote
1answer
14 views

.NetCore SignalR join group over API call

I have the following flow in mind: A .NetCore web app, where you can create multiple groups on a hub. Mobile app where user can join a group by passing the group name. The web app can send messages ...
0
votes
0answers
6 views

.Net Core mvc app with JsTree Lazy loading

I'm trying to build a JsTree in my .Net Core 3 MVC App. I found this article, but it is using a parameterless JsonResult constructor to produce JsomResult, which is not supported in Core 3.0. I ...
0
votes
0answers
23 views

Using seperate assembly for migrations

I am going mad on this. Running Visual Studio 2019 rel. 16.4.3 Create .Net Core 3.1 Razor App (WebLink) Create .Net Standard Class library (WebLink.DAL) Create models and DbContext in Class library ...
3
votes
1answer
65 views

Runtime generated expression cannot change dictionary's values

I'm trying to create some expression at runtime to change a given dictionary's values. I created this snippet which generates the expression successfully and compiles it an Action. But calling the ...
0
votes
0answers
13 views

Render Html code from a property using FluentMail in C#

I am using the FluentMail for sending emails from template in .Net Core. There is a problem when using it, because one property is a string where I store HTML, the problem that instead of processing ...
-1
votes
0answers
20 views

.NET Core embedded resources + Gitlab: ERROR: No files to upload

I am working on the .NET Core solution below: and I am using the Gitlab CI definition below: .gitlab-ci.yml: image: docker:stable services: - docker:dind stages: - test - build - deploy-db ...