Quantcast
Channel: ASP.NET Core

Show non-json response from API

Shopping cart in browser calls API in Apache server to add product to cart using additem. API controller returns BadRequest( new { title="errormessage"} ) in case or error and new { title="Product...

View Article


ASP.Net API that takes a IFormFIle shuts down IISExpress on execution

I think I am missing something obvious here, but I don't know what.  The project is a ASP.Net Core 3.1 API service which needs to allow another program send it files upwards of 15M.  Here is the...

View Article


Query regarding launchsettings.json

Hi ExpertsI have few queries regarding the launchsettings.json file in asp.net core. Here is my launchsettings.json{  "iisSettings": {    "windowsAuthentication": false,    "anonymousAuthentication":...

View Article

Image may be NSFW.
Clik here to view.

Themeable expander not finding layout page.

I want to give my customer themes in that they can create their own controllers views; What I do is have a folder called themes and copy the themes up on upload but for some reason the themeable...

View Article

Order by in Entity framework in mutliple table

Hello All, we are trying to add dynamic Order by different column in multiple tables. we will get column name and have to sort data. for example I want sort Department.Name or Staff=> JoiningDate ....

View Article


Input checkbox not passing its Model Value to the controller if I make...

I have given the code to make make the checkbox disabled conditionally , but when I call post method , always the value being passed as null rather than its model value. How can I pass model value to...

View Article

Keep getting error 500 while trying to upload file to API

When i try to get the name from the file it works perfect its only shows a error when i try to copy the image to a path: HttpPost: [HttpPost] public async Task<ActionResult<Product>>...

View Article

Asp.net core identity custom token provider TokenLifeSpan does not work when...

I have an asp.net core 3.1 MVC project with IdentityServer4.AspNetIdentity 3.1.2. When a user has created, an email with a link including confirming email token is sent using worker service to the...

View Article


Defining options in Startup.ConfigureServices() vs Configure() methods

I am new to .net core framework. I found that defining options can be done interchangeably in ConfigureServices() and Configure() methods. For e.g. to enable CORS we can do either of the following :...

View Article


Convert CSV file to NACHA format with ASP.net core

Hello  ASP.NET developers, I am new to .NET and trying to learn as much as I can. I have a project that I am trying to accomplish but I am having some issues with it. Basically, my scenario is as...

View Article

Image may be NSFW.
Clik here to view.

HttpConent does not contain a definition for ReadAsAsync and no accessible...

hi guysI have a web API project that uses a HTTPRequest class to get a remote JSON result file and pass to the calling app. However I want to encapsulate the functionality of the request in an a class...

View Article

How to get a service from anywhere using Microsoft.DependencyInjection?

Hello,I'm working on an ASP.NET Core 3.1 Web API project and I'm writing some integration tests. I created a database fixture that I use in my tests and for that I wanted to grab anIOptions object from...

View Article

I need help with this error

I need to know what means this error plesase any help.Error Message

View Article


Get user id in startup

Hi.How I can get current user id in ConfigureServicesor it is not possible ? 

View Article

Is it possible to send an extra parameter to the HandleRequirementAsync...

I want to be able to send a parameter to the handler, for example: ActivityId="1001", I could write some logic based on it. Can this be done? If yes how? If not then how could I access role passed in...

View Article


Creating a data filter in a API

Im not sure if this is the right approach to create a product filter system to filter products on a page. Reactjs:async getFilteredProducts() { const TitleFIlter =...

View Article

How can I force the input value with Max integer and Max Decimal .

How can I force the user to enter the  integer part maximum value 10 and decimal part maximum .59.  the system should only acccept the valuesfrom 1 to 10.59. The system should not accept  5.60  .The...

View Article


The correct method of implementing the clean architecture in asp core

I have seen several ways to implement a clean architecture in the asp core environment.Some only used repositories, some use use cases, some use Cqrs, some use Uow, some use repositories with Mediatr,...

View Article

Razor Pages - Date format in the "form-row input-group"

Date is displayed as mm/dd/yyyy.I would like to display date in my filter section as dd/mm/yyyy. No idea how to approach it.web.cshtml code<form method="get">            <div class="form-row...

View Article

AspNetCore.Identity in Console or Desktop App

Hi;I'm looking samples for aspnetcore.identity usage in Console or Desktop Core App. But there is no resources about it. I just wanna login a user with aspnetcore.identity in desktop app... If you have...

View Article


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>