asp.net-core-mvc Questions
7
I am using aspnet 5 and MVC 6.
I have created a view component using the instructions in HERE but when I run my website I get an error
A view component named 'XX' could not be found.
AT
@Compo...
Slung asked 25/11, 2015 at 18:4
2
Solved
I'm going to return a bad request result in my action filter.
I have two choices:
context.result = new BadRequestResult();
or
context.result = new BadRequestObjectResult();
It seems there are coupl...
Maillot asked 9/7, 2020 at 15:8
1
I have an ASP.NET Core MVC web application that has an endpoint which returns some data as a json. The onlly issue is that my data is around 5 MBs of raw (non-idented) JSON, and the response takes ...
Quartered asked 22/7, 2018 at 11:20
3
Solved
ASP.NET Core (Version: 2.2.102)
I am building an API to return Portos and Especies, but anytime that I access /api/portos (as defined in the controller), I get this error:
InvalidOperationExcep...
Phillada asked 17/1, 2019 at 15:56
4
Solved
I've got an older asp.net core identity database, and I want to map a new project (a web api) to it.
Just for the test, I copied the Models folder, and the ApplicationUser file from the previous p...
Northeasterly asked 16/1, 2017 at 14:58
3
Solved
I have an anchor which should replace a grid with a partial view .
<a class="btn btn-primary"
data-ajax="true"
data-ajax-method="GET"
data-ajax-mode="replace"
data-ajax-update="content"
...
Lorenalorene asked 30/1, 2018 at 2:25
3
Solved
I need to show value from the appsettings.json in a .cshtml file in ASP.NET Core 3.1 as we do in ASP.NET MVC like below:
@(System.Configuration.ConfigurationManager.AppSettings["SessionExpire&...
Siphon asked 16/2, 2022 at 16:45
3
Solved
_Create.cshtml (snippet)
@model MC.Models.AdminViewModels.NewUserViewModel
@await Html.PartialAsync("_ModalHeader", new ModalHeader() { Title= "New User"})
<div class="modal-body">
<form...
Deformed asked 19/8, 2017 at 15:11
4
I'm using an authentication middleware that is making API requests to a third party service. This middleware then sets up the claims that are later handled by an AuthorizationHandler in conjunction...
Interfertile asked 17/1, 2017 at 21:10
6
I'm playing around with MVC6 + Aurelia project in Visual Studio 2015 CTP6, and came across something interesting.
My node_modules is by default in the project root and everything works fine. Howev...
Alecto asked 31/3, 2015 at 13:30
2
Solved
I have installed VS2017 15.3.0 Preview 4 and .NET Core 2.0 Preview 2 and have created a default Web MVC application. I am interested in seeing how the new logging functionality works but I cannot g...
Incandesce asked 20/7, 2017 at 12:17
6
The following error occurs when creating a new ASP.NET Core MVC project or loading old projects in .NET 7:
All the archovios are created and in the right place.
The error persists even if you man...
Brushwork asked 22/3, 2023 at 4:8
6
I am working on an ASP.NET Core application and I would like to override the default validation error messages for data-annotations, like Required, MinLength, MaxLength, etc. I read the documentati...
Caliginous asked 24/11, 2016 at 13:47
6
Solved
System.AggregateException: 'Some services are not able to be constructed' In my ASP.net core
I have a model:
public class Checkout
{
public string CheckoutId { get; set; }
public List<CheckoutItem> CheckoutItems { get; set; }
}
And I am trying to add methods to the Object while ...
Furie asked 29/7, 2020 at 14:25
15
Well, lets get down to it. I'm using Visual Studio 2015 and ASP.NET core tag helpers have completely stopped working, no idea why as I've not changed anything. I was in work one day, they worked fi...
Emoryemote asked 30/12, 2016 at 11:34
12
I am using ASP.NET 5, In my solution I have Web API, Identity Server and Angular 2 project and I am authenticating Angular 2 client by using Identity Server, Angular 2 client consumes web api by pa...
Concoff asked 8/6, 2016 at 4:52
5
Solved
I've been trying to pass data to an action after a redirect by using TempData like so:
if (!ModelState.IsValid)
{
TempData["ErrorMessages"] = ModelState;
return RedirectToAction("Product", "Prod...
Guinevere asked 6/1, 2016 at 17:14
9
I am trying to host an ASP.net Core Web Application in a windows service. I am able to create a self contained deployment and created the windows service. My web application is configured to have p...
Filtration asked 11/12, 2018 at 12:25
4
Solved
The standard way AFAIK to return data in ASP.NET Core Web Api is by using IActionResult and providing e.g. an OkObject result. This works fine with objects, but what if I have obtained a JSON strin...
Lactoflavin asked 19/1, 2018 at 8:12
4
Solved
I'm newer to EF Core, so please forgive me if there is a trivial answer.
Take this scenario....
A new web-application is being developed using the latest version of ASP.NET Core, with a code-firs...
Alamein asked 4/5, 2018 at 18:33
7
Solved
I just come across a good write up for a new ASP.NET Core feature called Tag helpers.
From there, I understood that one can replace the following code:
@model MyProject.Models.Product
@using (H...
Alcinia asked 12/3, 2015 at 9:22
1
After booting up my PC I tried to continue using a previous project I had been working on:
ASP.NET MVC Core 6.0.
All of a sudden Microsoft.EntityFrameworkCore was not installed in the solution.
Aft...
Louisalouisburg asked 3/6, 2022 at 2:2
5
Solved
I am new to ASP.NET and programming too. I am using Visual Studio 2022 v17.5 and ASP.NET Core 6 for building a web application.
I am in the development environment. Initially all was going well but...
Senary asked 13/3, 2023 at 5:21
17
Solved
Sending a form POST HTTP request (Content-Type: application/x-www-form-urlencoded) to the below controller results into a HTTP 415 Unsupported Media Type response.
public class MyController : Contr...
Casaleggio asked 14/6, 2017 at 7:55
7
Solved
At this point I'm injecting things into my Controllers with ease, in some cases building my own ResolverServices class. Life is good.
What I cannot figure out how to do is get the framework to auto...
Reasoning asked 12/5, 2016 at 14:30
1 Next >
© 2022 - 2024 — McMap. All rights reserved.