Click here to Skip to main content
15,891,698 members
Everything / .NET / .NET Core

.NET Core

.NET-Core

Great Reads

by Marc Clifton
Implementing an SSL capable server in .NET Core WITHOUT ASP.NET, using nginx, and testing Postgres with EF, all running on an rPi
by Juan G. Carmona
Advanced logging in modern .NET applications. A Sunday-morning-proof-of-concept.
by Marc Clifton
Talk to your rPi over a Slack channel, getting status, controlling devices, and running shell (bash) commands and viewing the console output posted back to your Slack channel
by Marcelo Ricardo de Oliveira
The second of many articles featuring design patterns, architectural designs, frameworks and technologies leading to ASP.NET Core Microservices

Latest Articles

by optiklab1
Exploring world of NFTs and blockchain while prototyping wallet CLI application with efficient data structures using C# and .NET Core
by Maniezzo
A couple of lines of code to get the i-j indices of an upper triangular matrix (main diagonal included) from a linerized array.
by Bohdan Stupak
Batching is a nice technique that allows you to handle big amounts of data gracefully. Directory.EnumerateFiles is the API that allows you to organize batch processing for the directory with a large number of files.
by DomGries
Download and install any dependency such as .NET, Visual C++ or SQL Server during your application's installation!

All Articles

Sort by Updated

.NET Core 

20 Feb 2018 by #realJSOP
I've never had to deal with this, but is it possible that putting the 2nd app into its own area would work? Areas | Microsoft Docs[^]
28 Mar 2018 by #realJSOP
In your action method, try this: Request.Headers["myHeaderKeyName"] BTW, the controller class is reinstantiated with every request, so your stored request value will be null unless you store it a different way.
25 May 2018 by #realJSOP
I found this code with a simple google search. using System; using System.Management; ... private static void ShareSecurity(string ServerName) { ConnectionOptions myConnectionOptions = new ConnectionOptions(); myConnectionOptions.Impersonation =...
25 Jan 2019 by #realJSOP
Sharing files between multiple web apps in a single solution.
20 Apr 2019 by #realJSOP
Write a stored proc that adds the data to both tables, or set up a trigger.
13 Jun 2019 by #realJSOP
"prevent multiple tabs in browser of a given web site" - Google Search[^]
5 Nov 2021 by #realJSOP
One way to allow access to multiple model entities within a ASP.NET MVC view.
18 Feb 2021 by #realJSOP
A WPF ListView that automatically generates columns (that are also sortable) based on decorated entity properties
10 Nov 2017 by /n software
This article will give you easy instructions for setting up /n software components in your development environment.
8 Nov 2018 by 1suli0
Two HTTP headers are present, Content-Type:application/json and Accept:application/json My response look like this: "{\r\n \"auth_token\":...
14 Dec 2018 by 1suli0
Code goes like this: public async Task CreateUser(AppUser user, RegisterUserDto dto) { try { var result = await _userManager.CreateAsync(user, dto.Password); if (result.Succeeded) { ...
14 Dec 2018 by 1suli0
Configuring this in serializer options solved the problem. services.AddMvc(options=>....).AddJsonOptions(opt=> opt.SerializerSettings.ReferenceLoopHandling=Newtonsoft.Json.ReferenceLoopHandling.Ignore);
23 Apr 2020 by 855
how does .net core implement dependency injection for different lifetimes? how does a instance created and disposed for different lifetimes? What I have tried: What i could think is 1.singleton - use a global static dictionary to keep all the...
20 Jan 2019 by abdu_karami
as I am new to the .Net Core, I am facing the following issue I have Authentication_API that returns JWT Token to the login controller at client side. After successfull login, I want to redirect to Home page. But when I use [Autherize] attribute to the controller it is not working. But without...
23 Jul 2018 by Abhi1 Kanobi
I am trying to read a XML file from a URL and below is my code in .net core var url = "https://some.com/feeds/newfile.xml"; var httpClient = new HttpClient(); var result = httpClient.GetAsync(url).Result; var stream =...
29 Jun 2020 by adhikar patil
Hello, I want to get microsoft azure active directory roles in dot net core using TenantId and RedirectUri. I am having ClientId, TenantId, RedirectUri, Endpoints. So now how to get microsoft azure active directory roles based on these keys...
25 Feb 2020 by ADOConnection
How ASP.NET Core Razor turns templates into assemblies and runs them
9 May 2017 by Adriaan Booysen
Adding Seeding Framework towards EntityFrameworkCore that can be wired up in either a dotnet core Web Application or WebAPI
30 Nov 2019 by aEmad
This article takes us to a journey of implementing a pipeline using Azure DevOps.
17 Dec 2019 by AFell2
Is the CPersonMasterBase class you are using as the "person" property an abstract class? If not, does it also have a parameterless constructor?
14 Sep 2016 by Afzaal Ahmad Zeeshan
In this post I share a complete overview and explanation of creating and hosting ASP.NET Core applications on Linux environment -- without using any third-party plugins or libraries.
10 Oct 2016 by Afzaal Ahmad Zeeshan
Good request that you are making here. Sadly, there are very less guides that take Visual Studio Code into considerations and the one that do take it into consideration talk about .NET Core applications, and not the ASP.NET applications. I am currently working on a book titled, "Considering...
20 Nov 2016 by Afzaal Ahmad Zeeshan
Good question, :-)The fact is that this program allows you to strip out the file name from the command, then what it reads is the input that you pass to it, man page for lpr[^], reads as, Quote:If no names appear, the standard input is assumed.Input can be the bytes that you want to...
19 Feb 2017 by Afzaal Ahmad Zeeshan
In this article I will give you a complete overview of SQLite databases in Android and how to consume them using Xamarin APIs.
23 Jul 2017 by Afzaal Ahmad Zeeshan
Besides what Solution 1 suggestions, which won't work in a cross-platform framework. There is an SDK by Microsoft, which you can use in .NET Core, since .NET framework and .NET Core (or .NET Standard) have a different mode of dependencies, and platform support, so they require a bit of...
19 Aug 2017 by Afzaal Ahmad Zeeshan
.NET Core 2.0 brings a lot of improvements to the system, and it brings a lot of pain to the developers as well. I had a lot of problems upgrading .NET Core 1.x apps to .NET Core 2.0; I yet have to feel the promise it makes about performance and so, but let us see how to upgrade our existing applica
25 Jun 2018 by Afzaal Ahmad Zeeshan
The actual question here is, how to tell that an app is installed by user or System (including the IT department, etc. etc.). To use the Registry and find all the apps installed you have already checked this SO thread. But again, what is the purpose of using .NET Core for a task that can be done...
22 Nov 2018 by Afzaal Ahmad Zeeshan
That process needs to be debugged, you can use the Production Testing to do that, or you can even try to connect the Visual Studio to the live environment and do a live testing of the application. That way you will understand what is being missed on the environment; perhaps a missing...
16 Feb 2019 by Afzaal Ahmad Zeeshan
Apart from what Solution 1 tells, I have to recommend another approach. That approach is, to use string as the ID field in Entity Framework Core, and framework will automatically use Guid to generate the unique IDs. I have always used this, and this lets me sleep peacefully at night. Make the...
15 Apr 2019 by Afzaal Ahmad Zeeshan
Integrating Cognitive Services SDKs in a .NET Core based application and exploring how real-world scenarios can be tackled using ML services offered by Microsoft
18 Jun 2019 by Afzaal Ahmad Zeeshan
You need to check how WSFed is supported in .NET Core, see this link to understand how things have changed, ASP.NET MVC Core Authentication against On-Perm ADFS · Issue #1920 · aspnet/AspNetCore · GitHub[^].
18 Jun 2019 by Afzaal Ahmad Zeeshan
Maybe you are not understanding the purpose of EXPOSE in the Dockerfile. Read the second solution, and the link about exposing ports for ASP.NET Core and then continue reading the rest of the answer here. See this repository of mine, and check how this works. GitHub -...
22 Jun 2019 by Afzaal Ahmad Zeeshan
Please study how SMTP protocol works and how different SMTP service providers function. They do not allow, or sometimes they hide away the fact whether an account exists or not. I once worked on a project where we had to accept and receive the emails for every recipient email address (yes,...
18 Sep 2020 by Afzaal Ahmad Zeeshan
I am not sure if Windows Defender will try to prevent folder creation in the Documents/Downloads folder; it should require elevated access or protection when working in Program Files or other sensitive folders. One thing I would like you to...
1 Dec 2020 by Afzaal Ahmad Zeeshan
.NET Core is a backend technology in a web development stack, while JavaScript, jQuery (and other derivative technologies, such as Ajax) are for the frontend. If you are hands-on with JavaScript, why not go with Node.js? Node.js[^] If you are...
14 Sep 2016 by Afzaal Ahmad Zeeshan
A comprehensive guide to .NET Core for beginners
15 Apr 2019 by Afzaal Ahmad Zeeshan
Integrate Cognitive Services SDKs in .NET Core based app
19 Jan 2017 by AHMAD ANAS
In this article, you will learn how to create console application in .NET Core with NoSQL- MongoDB.
10 Aug 2019 by Ahmad N. Chatila
A hack tutorial that enables the use of Windows Forms Designer for .NET Core 3.0 (preview) based Windows Forms apps
26 Dec 2018 by ahmed_sa
problem How to get label text from table reference on database based on TableName and FieldName dynamically from database and show on view createEmployee . Meaning i need to get label text dynamically from database not static from model SO that Every Time i need to change text of label i...
7 Jan 2019 by ahmed_sa
Problem How to use save button in Create Action to make save in both cases insert and update using repository pattern ? and what changes i will make in view to accept update and insert . what i writing is when make new record or update record then use save button it will save using create...
6 Jan 2019 by ahmed_sa
I have controller name emp have action add i need when action add view loaded display last value increased by one in employeeid textbox meaning suppose i have in datbase employeeid 1 then when action add view loaded employeeid must have 2 so that how to do that please ? in action what i write ...
7 Jan 2019 by ahmed_sa
Problem When display next record of EmployeeId i get error on line below : Next NullReferenceException: Object reference not set to an instance of an...
7 Jan 2019 by ahmed_sa
when try to convert nextid to integer to assign to employeeid i get error as below System.InvalidCastException: 'Unable to cast object of type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[System.Int32]' to type 'System.IConvertible'.' employee id is integer and error show on...
9 Jan 2019 by ahmed_sa
Problem How to get model property of employee as EmployeeName,BranchCode From Result variable in controller ? I using asp.net core 2.1 visual studio 2017 repository pattern Generic but problem cannot display or show models in EmployeesController if i write result variable it not show...
12 Feb 2023 by ahmed_sa
I have application work in asp.net core 2.1 visual studio 2017 work with angular but when run page it show empty page i make inspect inside web page i get error as below Uncaught Error: inject() must be called from an injection context at injectInjectorOnly (core.js:1188) at inject...
18 Jan 2019 by ahmed_sa
Problem i work on asp.net core 2.1 visual studio 2017 code first with repository pattern when do create database i do as following Add-Migration InitialCreate but i got error Entity type 'Employee' has composite primary key defined with data annotations. To set composite primary key, use...
16 Jan 2019 by ahmed_sa
Problem How to implement repository pattern in asp.net core 2.1 visual studio 2017 with SQL server 2012 ? i work on project work on repository pattern but i cannot implement it 1- How to define repository on controller Employee to call function GetAll on constructor? meaning how to...
17 Jan 2019 by ahmed_sa
I work in project work in asp.net core 2.1 visual studio 2017 SQL Server 2012 I actually need to make entry form Sales Order consist from Sales Header Model and Sales Footer model on Sales Order Entry Form on Header(represent by Sales Header Model) SalesOrderNO 1 SalesYear 2019...
20 Jan 2019 by ahmed_sa
How to save sales order meaning How to insert data of sales order on Tables Sales Header and Sales Footer to save order Actually what i need is what i write under Create Action Result on sales ordercontroller to save order my create view of sales order as following View Of Create Action...
20 Jan 2019 by ahmed_sa
Problem when save data from controller when click create button to save i get error An unhandled exception occurred while processing the request. NullReferenceException: Object reference not set to an instance of an object. WebTabCore.Controllers.SalesOrderController.Create(SalesHeader sh) in...
21 Feb 2019 by ahmed_sa
Problem cannot pass data from view to controller by ajax request as input parameters to controller action method I have class model name SalesHeader as following public class SalesHeader { public int SalesOrderNo { get; set; } public int SalesYear { get; set; } ...
21 Jan 2019 by ahmed_sa
Problem orderItems list store only last record and ignore another rows problem when click save button why ? meaning saleslino quantity 1 2 2 6 3 9 it must store all in list but actually it store wrong it store last record only meaning it store 3 and its...
25 Jan 2019 by ahmed_sa
Problem When Call get all repository pattern i dont found singleordefaultasync compile error . error details Ienumerable doesn't contain definition for singleordefaultasync and no accessible extension method singleordefaultasync accepting first argument of type ienumerable...
25 Jan 2019 by ahmed_sa
Problem How to get max value based on composite key branchCode,EmployeeId i work on asp.net core 2.1 visual studio 2017 How to get max number per branch code not for all branches ? repository interface public interface IrepositoryTab where T : class { IEnumerable...
27 Jan 2019 by ahmed_sa
How to solve this Error and why this happen ? An unhandled exception occurred while processing the request. ArgumentException: Entity type 'Employee' is defined with a 2-part composite key, but 1 values were passed to the 'DbSet.Find' method....
8 Feb 2019 by ahmed_sa
Problem How to check id exist or not generic repository pattern asp.net core 2.1 ? because i have more than 10 controllers so that i need to write function check if id on table exist or not . like that if (!EmployeeExists(emp.EmployeeId)) { ...
3 Apr 2019 by ahmed_sa
Problem How to bind sales header Model to collection of sales Line using asp.net core 2.1 ? I work on project have Sales Order form this form contain to salesHeader salesFooter so that i already have model Sales Header have navigation property to Sales Footer as following SalesHeader Model ...
9 Feb 2019 by ahmed_sa
problem How to use dynamic datatype on more than one key GetByID repository pattern ? public T GetById(int Id) { return dbSet.Find(Id); } and in interface Igenerics T GetById(int Id) actually i need T GetById(int Id,key2,key3,...etc) What I have tried: How...
14 Feb 2019 by ahmed_sa
problem i get error on edit action result when save data using asp.net core 2.1 ? error on line foreach (var Footer in Header.SalesFooters) on sales footer is null why and how to solve error ? System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance...
14 Feb 2019 by ahmed_sa
problem cannot apply index with [ ] to an expression of type Icollection mvc view asp.net core 2.1 public class SalesHeader { public SalesHeader() { } public int SalesYear { get; set; } public int BranchCode { get; set; } public...
14 Feb 2019 by ahmed_sa
Problem I work on asp.net core 2.1 project with sql server 2014 this project is mvc controller not web api . we decide to make client side with angular 7 so that i will have two project project have angular client side another project is asp.net core mvc or web api server side . so that...
16 Feb 2019 by ahmed_sa
Problem How to represent create new employee record by web API ? i work on project asp.net core 2.1 i create mvc controller employee controller and inside it i make create action result for create new employee view . Create function with get type and show last record exist on database plus...