Category "asp.net-core"

Couldn't add .NET Core tasks.json in VSCode

I've created an ASP.NET Core app with Angular from the console (dotnet new angular command). I want to enable debugging in Visual Studio Code for this applicati

WindowsImpersonationContext & Impersonate() not found in ASP.Core

I had the following in a .NET Framework 4.0 assembly: var newId = new WindowsIdentity(duplicateTokenHandle); WindowsImpersonationContext newId = ImpersonatedIde

MVC1000 Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync

Trying to make a web app using .Netcore When I run the application I get this error. Help me This is not a errors but a warning. But help me to resolve I added

Unable to resolve service for type ApplicationContext

I have my ApplicationContext as following :- You can see i am deriving ApplicationContext from ChildContext (child class) that in the end derives from `Identit

Sending a message to whatsapp groups through twilio with asp.net core

I am trying to use whatsapp business api for my application with twilio. I already have read the documentation of whatsapp business api. My question is, can we

Optional section was not defined error in nested layout pages

I have a _Layout.cshtml file that contains the following line. @RenderSection("Scripts", required: false) And then I have a StorageLayout.cshtml file that spec

C# - Two-Factor Authentication (without ASP.NET Core Identity)

Is it possible to implement a two-factor authentication without use ASP.NET Core Identity? I have my own login table and everything works fine with login + pass

.Net Core Dependency Injection inject out of constructor

I need to inject out of constructor, everything I declared in Setup. Ho can I do it ? How can I inject services out of constructor ? Something like Injector s

Sharing common database between .Net core and .Net standard Identity framework

I have old legacy MVC app that uses Identity 2.0. Also recently I have created .Net 6 API with Identity 6.0 (AspNetCore.Identity.EntityFrameworkCore). Note: The

Sharing common database between .Net core and .Net standard Identity framework

I have old legacy MVC app that uses Identity 2.0. Also recently I have created .Net 6 API with Identity 6.0 (AspNetCore.Identity.EntityFrameworkCore). Note: The

Nuget Pack in Azure Pipelines: The method or operation is not implemented

I am trying to build a DotNetCore project and push the package to Azure Artifacts. The Azure-Pipelines.yml I have is the following: trigger: - master pool:

Populate IConfiguration for unit tests

.NET Core configuration allows so many options to add values (environment variables, json files, command line args). I just can't figure out and find an answer

How to forward/pass windows authentication from client to another REST API in an ASP.NET Core app with Angular?

I am currently implementing an ASP.NET Core app with Angular as described here. With the help I got in this question, I was already able to get the application

How to run 'dotnet dev-certs https --trust'?

I'm new in ASP.NET. Environment: Ubuntu 18.04 Visual Studio Code .NET SDK 2.2.105 I'm in trouble with some command running. I was reading tutorial at https

Can google openID be used in an intranet application?

Is it possible to use Google's OpenID API from an application that is being served in an intranet (accessed with a VPN but has access to the internet)? I assume

xunit test for IFormFile field in Asp.net Core

I have an Asp.net Core method with below definition. [HttpPost] public IActionResult Upload(IFormFile file) { if (file == null || file.Length == 0)

Run an ASP.NET Core project with Kestrel without Visual Studio

I've created an ASP.NET core 2.1 project in VS2017 and run it successfully from VS2017. The question is, What is the easiest way to run the above configuration

Change the headers of static files in Asp.net Core

I am using package Microsoft.AspNet.StaticFiles and configuring it in Startup.cs as app.UseStaticFiles(). How can I change the headers of the delivered files ?

Simple way to add extra parameter to Automapper ForMember

So, I have a mapping ObjectFrom to ObjectTo. ' All mappings can be done ObjectFrom.propX -> ObjectTo.propX2. But there is also a property in ObjectTo that ne

scaffold-DbContext , command results in exception: System.Reflection.TargetInvocationException

When attempted to run a scaffold command I am now receieving the exception noted below. It may be important to note that this stopped working all of a sudden. C