Questions tagged [asp.net5]

Do not use this tag anymore. – “ASP.NET 5” is an older name referring to the modern web framework which was then released under the name “ASP.NET Core”. Use the [asp.net-core] tag for general questions about ASP.NET Core. For questions specifically about ASP.NET Core 5, use the [asp.net-core-5.0] tag.

ASP.NET 5 was the (code-)name of the next major release of Microsoft's ASP.NET framework. The name was abandoned and the product was released as ASP.NET Core 1.0.

Related tags:

  • : For general questions about ASP.NET Core.
  • : For questions specifically about ASP.NET Core 5.0.
  • : For questions about the legacy ASP.NET MVC 5 framework running on the .NET Framework.
333 questions
77
votes
4 answers

Can't uninstall .NET 5 RC1

I'm trying to install .NET 4.6.1, but it claims I have a newer version installed and won't let me. I do have .NET 5 installed, so I'm trying to uninstall that. I had two installations, one for RC1 and one for RC1 Update 1. I removed the Update 1…
vaindil
  • 7,536
  • 21
  • 68
  • 127
41
votes
3 answers

How to pretty print using System.Text.Json for unknown object

Using System.Text.Json i can pretty print json using serialization option. var options = new JsonSerializerOptions{ WriteIndented = true }; jsonString = JsonSerializer.Serialize(typeToSerialize, options); However, I have string JSON and don't know…
LP13
  • 30,567
  • 53
  • 217
  • 400
14
votes
1 answer

VS 2015: Profiling tools disabled in Performance Wizard

I want to sample the performance of our application, but the various tools (such as CPU Usage and Application Timeline) are not available when trying to start a new profiling session with the Performance Wizard: I am using Visual Studio 2015…
Dave New
  • 38,496
  • 59
  • 215
  • 394
12
votes
3 answers

System.NotSupportedException: Serialization and deserialization of 'System.Action' instances are not supported. Path: $.MoveNextAction

I am following a simple tutorial on .NET 6 and it should work really simple, but apparently I get the exception. The sample code is the following: public async Task>> GetAllCharacters() { var response = new…
vpp090
  • 603
  • 1
  • 5
  • 9
12
votes
3 answers

Asp.Net 5/Core app.UseExceptionHandler() not working

I have in startup (UPDATE: the solution was to move UseRouting under the /api/error routes) app.UseRouting(); if (env.IsDevelopment()) { app.UseExceptionHandler("/api/error/error-local-development"); …
edelwater
  • 2,650
  • 8
  • 39
  • 67
11
votes
6 answers

How to use UseStaticFiles in ASP.NET Core 1.0

I can't find many proper Core 1.0 tutorials yet, but when I google the method name, I get umpteen examples that say to include in Startup.cs: app.UseDefaultFiles(); app.UseStaticFiles(); Yet I get compile errors that neither method exists on app,…
ProfK
  • 49,207
  • 121
  • 399
  • 775
11
votes
3 answers

ASP.Net MVC Angular 2 Final

Has anyone tried Angular 2 RC Final with ASP.Net MVC? I am having trouble with configuring Angular 2 RC 6 with ASP.Net MVC, till beta 17 everything was working fine. The package.json with below configuration doesn't seems to be…
Naveed Ahmed
  • 10,048
  • 12
  • 46
  • 85
11
votes
3 answers

EF 7 Migration to Existing Database

I am working on a web project using ASP.Net 5 and EF7. I have imported all the tables from existing database onto my models in my project. However, I am having problems in regards with migrations. I have created the initial migration, made some…
user6067295
11
votes
1 answer

ASP.NET 5 (vNext) different dependencies for build Release and Debug

We have an ASP.NET MVC 5 project that we are developing that depends on projects from a different solution. The other solution are class libraries that are common, and we publish as NuGet packages. When we release we compile the project and have it…
developer82
  • 13,237
  • 21
  • 88
  • 153
10
votes
6 answers

.NET 5.0 Web API won't work with record featuring required properties

I'm using a C# 9.0 record type as a binding model for a .NET 5.0 Web API project. Some of the properties are required. I'm using the record positional syntax, but am receiving errors. public record Mail( System.Guid? Id, [property:…
10
votes
1 answer

How to structure an asp.net 5 dnx project with unit tests in Visual Studio Code?

I just created a new asp.net 5 project using the yeoman generator. Everything worked fine so far, I can edit and build the project with Visual Studio Code. Now I want to add unit tests, but how are they structured in VS Code? In Visual Studio, the…
looper
  • 1,929
  • 23
  • 42
10
votes
1 answer

Replacement for IRegisteredObject in ASP.NET 5?

I am trying to build a simple ASP.NET 5 app with SignalR which should push messages to clients at regular intervals (e.g. implement a dashboard with values pushed from the server to the browser.) I researched some posts such as…
AunAun
  • 1,423
  • 2
  • 14
  • 25
9
votes
1 answer

Logging LogLevel-Information not showing in Windows event log

I ran into some problems with logging **Information** Logs to Windows event log. Starting from a blank ASP.NET Core-Web-API .Net 5 I edited the following to Program.cs public static IHostBuilder CreateHostBuilder(string[] args)…
Paul Pascher
  • 317
  • 2
  • 14
9
votes
1 answer

Using Docker Buildkit --mount=type=cache for caching Nuget packages for .NET 5 dockerfile

Currently I am creating a dockerfile for a vue+mvc .net 5 hybrid application. For this, I need to install nodeJS, nuget packages as well install webpack. Everytime when I am trying the build the image, its taking around 30 min. I explored how can I…
SKK
  • 93
  • 1
  • 4
9
votes
3 answers

ASP.NET Core 1 Web API Model Binding Array

How do you model bind an array from the URI with GET in ASP.NET Core 1 Web API (implicitly or explicitly)? In ASP.NET Web API pre Core 1, this worked: [HttpGet] public void Method([FromUri] IEnumerable ints) { ... } How do you do this in…
marras
  • 91
  • 1
  • 2
1
2 3
22 23