Skip to main content

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
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 ...
NeilMacMullen's user avatar
159 votes
3 answers
53k views

ASP.NET Core 2.2 -> 3.0 upgrade. env.IsDevelopment() not found

I upgraded an existing 2.2 project to 3.0. I copied the new code for Program/Startup from a new 3.0 project to my existing 2.2 project. It worked, but the IsDevelopment() below: public void Configure(...
Damn Vegetables's user avatar
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 ...
tarun713's user avatar
  • 2,187
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 ...
Alex Zaitsev's user avatar
  • 2,726
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....
Andrei's user avatar
  • 43.9k
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 ...
kofifus's user avatar
  • 18.7k
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 ...
Ondrej Vencovsky's user avatar
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 ...
Guilherme's user avatar
  • 5,301
87 votes
2 answers
36k views

What is the alternate of HttpRequest.EnableRewind() in ASP.NET Core 3.0?

BufferingHelper.EnableRewind(); Above is an extension method for HttpRequest object in ASP.NET Core 2.2. It is no more there in ASP.NET Core 3.0 (atleast with this name). I want to know it's ...
Muhammad Fahad Nadeem's user avatar
71 votes
6 answers
50k views

How to read configuration settings before initializing a Host in ASP .NET Core?

Before initializing the application Host I need to read some settings from the application's configuration to setup some other things. In ASP .NET Core 2.x to read settings before initializing the ...
Gwinn's user avatar
  • 1,338
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 ...
Poul K. Sørensen's user avatar
64 votes
10 answers
64k views

Ignore property when null using the new Net Core 3.0 Json

When using JSON.Net in ASP.Net Core 2.2 I was able to ignore a property when its value was null when serializing to JSON: [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public DateTime? ...
Miguel Moura's user avatar
  • 38.6k
61 votes
2 answers
22k views

What is the difference between Host and WebHost class in asp.net core

I was trying to migrate the my application from asp.net core 2.1 to 3.0 and there come a first suggested change in program.cs for creation of host. asp.net core 2.1 program.cs public static void ...
Ashish Rathi's user avatar
  • 1,508
51 votes
21 answers
97k views

Unable to connect to web server 'IIS Express'

I am using Microsoft Visual Studio 2019 Community preview, version 16.4.0 Preview 1.0. I just updated to Windows 10 Pro Version 1903 OS build 18362.418. With an ASP.NET Core 3 web app project (Blazor ...
Vy Do's user avatar
  • 50.8k
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, ...
Asons's user avatar
  • 86.5k

15 30 50 per page
1
2 3 4 5
57