Skip to main content

Questions tagged [asp.net-core-mvc]

ASP.NET Core MVC is a lightweight presentation framework for creating dynamic websites with ASP.NET Core. It allows for creating controller based MVC sites, or view model based Razor pages. MVC includes features like routing, model binding and validation, filters, web APIs and the Razor view engine.

4,882 questions with no upvoted or accepted answers
8 votes
0 answers
2k views

Error -4077 ECONNRESET connection reset by peer kestrel

I am having the below error in my .net core application Error -4077 ECONNRESET connection reset by peer What does this exactly means ? I have noticed if kept my application in idle state for long ...
XamDev's user avatar
  • 3,607
8 votes
0 answers
2k views

ASP.net 5 Web API Post CreatedAtRoute always returns 500 Internal Server Error

The database works. It does actually insert the new record, but when I use CreatedAtRoute(), I always get a 500 back from the client. Why? My controller's Get: [Route("api/[controller]")] public ...
Mickael Caruso's user avatar
8 votes
0 answers
406 views

MVC 6 vNext ViewComponent Scripts?

I am building an MVC 6 vNext web application. I am considering using the new ViewComponents to encapsulate "widgets" for my site. Widgets should be able to render and function independently of the ...
user1142433's user avatar
  • 1,541
8 votes
0 answers
2k views

ASP.NET 5 Beta 8 Hosting error: HTTP Error 502.3 - Bad Gateway

I created a new ASP.NET 5 Beta 8 project using simply the default template. When I publish the project and host it on a server using IIS 8.5 I get the error: HTTP Error 502.3 - Bad Gateway There was ...
Miguel Moura's user avatar
  • 38.6k
8 votes
1 answer
6k views

How to use EF6 (DB-first) with ASP.NET core web application(.NET framework 4.6.1)?

I am building asp.net core web application using full .NET framework 4.6.1 template like this- My project.json shows- "frameworks": { "net461": { } }, I wanted to use EF6 (not EF core), ...
Gretel Hendricks's user avatar
7 votes
0 answers
2k views

Visual Studio 2022 is not finding codegenerators for scaffolding

Rel: aspnet-codegenerator: No code generators available, Even after adding Microsoft.VisualStudio.Web.CodeGeneration.Design I have the same issue as presented in the linked question but with Visual ...
ZorgoZ's user avatar
  • 3,238
7 votes
0 answers
514 views

Tag helpers not working with DynamicRouteValueTransformer

ASP.NET Core's tag helpers appear not to be working in combination with DynamicRouteValueTransformer. Here's an MCVE: let's say we have a simple controller with two actions... public class ...
Max's user avatar
  • 9,679
7 votes
0 answers
2k views

How to use DisplayTemplates in MVC core 2.0

I used to use DisplayTemplates in MVC5 to get rid off foreach loops from views If I have a ProductDto and ProductController I would place a ProductDto.cshtml under Views/Product/DisplayTemplates/...
akd's user avatar
  • 6,728
7 votes
0 answers
1k views

No bower/npm config files are part of the latest .NET Core 2.0 Web App templates, but client-side libraries are installed

The latest ASP.NET Core 2.0 template doesn't have a bower config or a packages.json, but comes with client side packages such as bootstrap and jquery. How do we takeover from here and manage these ...
Blake Rivell's user avatar
  • 13.6k
7 votes
1 answer
956 views

Is it possible/sensible to split ASP.Net Core 2 (.NET Framework) Web Api into Class Library and Hosting projects?

I'm trying to port an existing WCF Web API (targeting .NET Framework 4.6.1) to ASP.Net Core 2 using Visual Studio 2017 (v15.4.5) and am having trouble figuring out good/common/supported ways to ...
Norbini's user avatar
  • 81
7 votes
0 answers
1k views

How to ignore key unprotect errors

My application often fails with failed to unprotect session cookie (I am using two applications with different assembly versions). Error unprotecting the session cookie. The key {hex_key} was not ...
Shadow's user avatar
  • 2,338
7 votes
0 answers
2k views

How use IChangeToken to expire a token?

I wont to change a Token when DbContext.SaveChange() method called and ChangeTracker has change: public override int SaveChanges(bool acceptAllChangesOnSuccess) { if (SettingChanged() == true) ...
alireza.salemian's user avatar
7 votes
1 answer
164 views

UrlRewrite Middleware and Client Applications

I am not even sure if url rewriting will fit my use case but I have a feeling it might (using Microsoft.AspNetCore.Rewrite). I have a client served by my ASP.NET Core project with UseStaticFiles(). ...
Lutando's user avatar
  • 5,000
7 votes
0 answers
443 views

How to compile views as a syntax checking in ASP.NET Core MVC 1?

I would like to have a compile-time validation of the views. In my old web application, written for MVC 5, I have these entries located in the csproj file: <PropertyGroup> <MvcBuildViews&...
romanoza's user avatar
  • 4,823
7 votes
1 answer
3k views

Asp.Net Core MVC on Azure Cloud Services?

There are a lot of articles on Asp.Net Core 1.0 and its cross-platform features. I know that it's possible to deploy it to Linux, OSX, Windows. I've read a lot fo step-by-step articles how to do that. ...
Adalyat Nazirov's user avatar

15 30 50 per page