Category "asp.net-core"

Render partial view on button click in asp.net core

Based on which button is clicked i want to render a partial View inside a div element. If button1 is clicked then Partial View1 is rendered and if button2 is cl

React native with Asp.net Core photo upload

I want to upload photos with React Native. My API attempt from Postman resulted in a positive. But React Native didn't make it. React Native function upload

React native with Asp.net Core photo upload

I want to upload photos with React Native. My API attempt from Postman resulted in a positive. But React Native didn't make it. React Native function upload

How to download file on browser from Dotnet core endpoint

I have a react front-end and the dotnet core web API project on the back-end. I have an endpoint on which a client can request a file using fileId from my react

ASP.NET model that requires a reference to a IdentityUser?

I have a model Blueprint that requires a reference to an IdentityUser. When I run Add-Migration CreateBlueprintSchema the following error is thrown: No suitabl

Do not add to list if it is null c#

I am trying to create a list from anonymous function. I want the list to be created if request model properties are not null. Currently, it is adding null to th

Net Core API: Purpose of ProducesResponseType

I want to understand the purpose of ProducesResponseType. Microsoft defines as a filter that specifies the type of the value and status code returned by the act

Unexpected character encountered while parsing value: . Path '', line 1, position 1

I've created an out of the box .NET Core 2.2 solution and run it. As in: Create Project, selecting ASP.NET Core Web Application. Select API as the project tem

Click on ASP .Net Core Identity Log In button leads to 400 error

I'm writing simple asp .net core 2.2 MVC app with individual authorization (ASP Identity) hosted on IIS 10. If user navigates to Login page, stays idle for 20+

Blazor server app still authorized even after altering cookies

I have tested a sample Blazor server application that uses standard ASP.NET Core Identity and I logged in successfully. But even after I tried to alter the cook

Serilog not writing to file on Ubuntu

I have deployed a website to a ubuntu machine but unable to get serilog to write to file Here is what I have: In Program.cs (omitted unnecessary parts): public

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