Questions tagged [asp.net-core-3.0]
Use this tag for questions specifically related to ASP.NET Core 3.0, in addition to using the 'ASP.NET Core' tag.
asp.net-core-3.0
148
questions
202
votes
7
answers
156k
views
Where did IMvcBuilder AddJsonOptions go in .Net Core 3.0?
I've just upgraded my ASP web API project from .NET Core 2.0 to 3.0. I was using
services.AddMvc()
.AddJsonOptions(opts => opts.SerializerSettings.ContractResolver
= new ...
123
votes
6
answers
173k
views
How to set json serializer settings in asp.net core 3?
json serializer settings for legacy asp.net core applications were set by adding AddMvc().AddJsonOptions(), but I don't use AddMvc() in asp.net core 3. So how can I set global json serialization ...
25
votes
1
answer
20k
views
Modifying a JSON file using System.Text.Json
I know you can do this easily with Newtonsoft. As I am working with .NET Core 3.0, however, I am trying to use the new methods for interacting with JSON files —i.e., System.Text.Json—and I refuse to ...
104
votes
5
answers
69k
views
ASP.NET MVC Core API Serialize Enums to String
How to serialize Enum fields to String instead of an Int in ASP.NET MVC Core 3.0? I'm not able to do it the old way.
services.AddMvc().AddJsonOptions(opts =>
{
opts.JsonSerializerOptions....
126
votes
9
answers
55k
views
.NET Core 3.0: Razor views don't automatically recompile on change
According to the documentation, Razor views should, by default, recompile on change on local environments for ASP.NET Core 3.0.
However, my project doesn't do this locally. If I change a view and ...
69
votes
11
answers
101k
views
ASP.NET Core 3.0 [FromBody] string content returns "The JSON value could not be converted to System.String."
Using [FromBody] string content on an ApiController in ASP.NET Core 3.0 returns a validation error:
{"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title":"One or more validation ...
51
votes
8
answers
28k
views
.Net Core 3.0 JsonSerializer populate existing object
I'm preparing a migration from ASP.NET Core 2.2 to 3.0.
As I don't use more advanced JSON features (but maybe one as described below), and 3.0 now comes with a built-in namespace/classes for JSON, ...
8
votes
2
answers
5k
views
How to use both Blazor client and server in same web
I'm learning about the Blazor, and see benefit of 2 types client-side and server-side.
I want to use both on the same web e.g. one path is a client-side WebAssembly app, another path is a server-side ...
5
votes
1
answer
2k
views
Identity UI no longer works after switching to .net core 3 endpoint routing
After having a hard time getting my area to show with endpoint routing i managed to fix it in this self answered thread (albeit not in a very satisfactory way) : Issue after migrating from 2.2 to 3.0, ...
98
votes
5
answers
83k
views
'IHostingEnvironment' is obsolete
I updated my ASP.NET Core project to .NET Core v3.0.0-preview3, and I now get:
Startup.cs(75,50,75,69): warning CS0618: 'IHostingEnvironment' is
obsolete: 'This type is obsolete and will be ...
45
votes
2
answers
55k
views
IHostBuilder does not contain a definition for ConfigureWebHostDefaults
I'm trying to use the new GenericHost in .NET Core 3.0 documented here but I'm getting a really basic error that stats IHostBuilder does not contain a definition for the ConfigureWebHostDefaults ...
31
votes
2
answers
21k
views
.NET CORE 3 Upgrade CORS and Json(cycle) XMLHttpRequest Error
I had my working project written in asp.net core 2.1 for a long time, but yesterday, I was forced to upgrade it to .net core 3.0 (due to 2.1 cannot call Dll' s which are written in 3.0 already).
With ...
2
votes
1
answer
8k
views
ASP.NET Core 3: Cannot resolve scoped service 'Microsoft.AspNetCore.Identity.UserManager`1[Alpha.Models.Identity.User]' from root provider
When I run the project, I encounter this problem:
(I've used asp.net core 3.)
Cannot resolve scoped service 'Microsoft.AspNetCore.Identity.UserManager`1[Alpha.Models.Identity.User]' from root ...
92
votes
5
answers
80k
views
Application is running inside IIS process but is not configured to use IIS server .NET Core 3.0
I have migrated our application from .NET Core 2.2 to version 3.0. Actually I created the new application in 3.0 from scratch and then copied source code files. Everything looks great but when I try ...
87
votes
18
answers
102k
views
ASP.NET Core 3.0 not showing on Visual Studio 2019
I want to test the new Blazor server-side framework (aka Razor Components).
I installed Visual Studio 2019 RC, and then the .Net Core 3.0 preview 2, following this official tutorial.
After the ...