Download file through WebApi returns JSON
I’m using Visual Studio 2019, WebApi project, .NET Core 3.1
I’m using Visual Studio 2019, WebApi project, .NET Core 3.1
I’ve configured health checks using the middleware in an MVC application, but have been asked to enforce https on the health endpoint for security reasons. For separate reasons, I can’t enforce it across the service as a whole, and so I was wondering if there was a mechanism to selectively do this to just the health endpoint. While it’s possible to do this with a controller, but I can’t seem to achieve it for the endpoint created by the middleware.
I want to redirect to an action that says Order is successful, but when the form is submitted, it redirects to the same action /Checkout with error: This page isn't working. This is understandble since the query strings are not present, but this doesn’t matter to me. I want
it to redirect to /OrderComplete instead. The debugger confirmed ModelState is valid and RedirectToAction is hit every time.
This is extracted from the Azure App Service eventlog. I think it is related to some Localizated Int.Parse(string, CultureInfo) I need to use because I have to deal with several distinct cultures.
¿Any answer to fix this problem?
So I’m trying to save a form records to the SQL server database. The problem is that in the form I have to upload multiple files with a button and one action is about file upload and the other action method is about saving the fields of the form in the database. I don’t know how to solve this
I’m using Asp Net Core 3.1 and am working on developing admin controls to approve and delete submitted images that are awaiting approval. The functionality that I am developing and am stuck on is as follows: I have created a grid of images waiting approval (using a loop in razor) and would like to click a button to “approve” that image via the logic I have written in my controller. How would I pass that data to the controller without refreshing the page?
I’m trying to generate an accordion dynamically using bootstrap and ASP.NET Core.
The goal is to show all terms which belong to a certain category but the problem is that only the first two out of four categories are expanding/collapsing. I can see, that each card-header and card-body is available in the DOM.
My code looks like this:
I’m working on a webapi project using .netcore.
I want a user to be able to get the closest user. So, I have to get the user’s longitude and latitude from the browser and send it to the OnPost action method below. Each time the user visits the website, the position is updated. NOTE: The point class which takes the coordinates in the controller, is from the NetTopologySuite library used for modelling and manipulating 2-dimensional linear geometry
I’m trying to remove or hide items from a list and I’m facing two problems, 1- the newly cannot be removed, 2- Tried to tag the deleted items as isDeleted = true using Javascript then later delete them in the controller following this answer https://stackoverflow.com/a/40572625/10773318 but it didn’t work.