Questions tagged [asp.net-core-3.1]

Use this tag for questions specifically related to ASP.NET Core 3.1, in addition to using the 'ASP.NET Core' tag.

ASP.NET Core 3.1 is the Long Term Support version of ASP.NET Core running on .NET Core 3.1. It's included in Visual Studio 2019 16.4

See the tag for more information or ASP.NET Core Updates in .NET Core 3.1

2338 questions
8
votes
3 answers

Serializing Enum as string using attribute in Azure Functions 3.0

I have tried getting an HTTP-trigger in an Azure Functions 3.0/3.1 app to return the string-representation of enums without any luck. I have tried both Core 3.0 and Core 3.1. Given this class: public enum TestEnum { TestValue } public class…
8
votes
2 answers

How to disable "Attempting to reconnect to the server" message on ASP.NET Core producton server

I have an ASP.NET Core 3.1 C# razor pages application that also uses some Blazor-serverside razor components. I have published it to IIS on Windows 2008 R2 Server. But when browsing the site in Chrome on one andorid mobile phone a message appears…
7
votes
4 answers

NuGet Package Manager attempting to add .NET 5.0 updates to .NET Core 3.1 application

When I go into Tools | NuGet Package Manager | Manage NuGet Package for Solution, it shows me there are 12 updates available. But when I attempt to update them all, I get errors. NU1202: Package Microsoft.VisualStudio.Web.CodeGeneration 5.0.0 is not…
7
votes
1 answer

ASP.NET Core 3.1 does not call PostConfigure on the class implementing IPostConfigureOptions

In my ASP.NET Core 3.1 application, I want to do some settings AT THE END since they are dependent on some other services being registered in the Startup.cs only. Can someone help me to understand why my class implementing the…
Learner
  • 4,391
  • 8
  • 51
  • 91
7
votes
1 answer

Razor Page Runtime Compilation not working

I am trying to get Razor runtime compilation working in an MVC Core 3.1 web application for Razor pages, but it's not working for me. It's frustrating as I have several previous MVC Core web applications across several releases (2.0, 2.1, 3.1) using…
RobA
  • 73
  • 5
7
votes
3 answers

C# Exchange Web Services Attachment Saving not working after .Net Core 3.1 Migration

Hopefully a very simple one. I migrated an application to .net-core 3.1 from .net framework 4.7 that uses EWS. Other than making numerous interactions Async all seems to be working fine without any change. Apart from downloading attachments from the…
Mr Harno
  • 308
  • 1
  • 7
7
votes
1 answer

Using ASP.NET Core 3.1 with Node.js?

I have read that NodeServices have been deprecated for ASP.NET Core 3.1. Is it still possible to use Node.js to build my JavaScript files into the dist folder in wwwroot?
7
votes
1 answer

Filtering dotnetcore health check logs

Is it possible to filter logs using the default dotnetcore logging specific to health check requests? So this would be ignoring requests to paths such as /health I can see the filtering available by category and type but this is not enough, as it…
Tim Peel
  • 2,124
  • 5
  • 22
  • 43
7
votes
1 answer

Group join in EF Core 3.1

I am trying to group join in EF core 3.1 the problem it returns Processing of the LINQ expression 'DbSet failed. This may indicate either a bug or a limitation in EF Core my code is like this var employees = await (from enrollment in…
7
votes
4 answers

Certificate Authentication Implementation in ASP.NET Core 3.1

I am building a small feature in ASP.NET Core Certificate authentication as given in official docs. Note: I am not building APIs, I am just trying to secure some Action methods of some controllers so that these secured action methods are opened…
yogihosting
  • 3,745
  • 2
  • 31
  • 54
7
votes
2 answers

ASP.Net Core exclude published language directories other than english

I publish my ASP.Net Core 3.1 Server like this: dotnet publish --configuration Release --runtime win7-x64 -p:PublishTrimmed=true --output c:\MyServer What I get in c:\MyServer is a lot of international language directories: cs, de, es, fr, zh-hans…
kofifus
  • 11,635
  • 8
  • 73
  • 114
7
votes
1 answer

ASP.NET Core BundleMinifier removes async modifier after minification

I added bundleconfig.json to ASP.NET Core application. It has the following structure: [ { "outputFileName": "wwwroot/js/main.min.js", "inputFiles": [ "wwwroot/js/scripts/first.js", "wwwroot/js/scripts/second.js" ], …
7
votes
6 answers

Razor code blocks not working in ASP.NET core 3.1

The @Helpers is gone from Razor in ASP.NET Core 3.1 and now as an alternative suggested to use Razor code blocks. https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-3.1#razor-code-blocks Unfortunately, if I add example…
Tomas
  • 15,501
  • 38
  • 136
  • 233
7
votes
1 answer

Equivalent of UseUrls for .NET Core 3.1/IHostBuilder

Previously, with .NET Core 2.2, I could add UseUrls to my Program.cs file to set the URL that the web server would run on: public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) …
Merlin04
  • 567
  • 6
  • 20
7
votes
1 answer

Endpoint Routing .net core 3-Multiple Areas

I am trying to migrate from .net core 2.2 routing to endpoint routing in asp.net core 3 with following route in startup My .net core 2.2 route were routes.MapRoute( name: "default", template:…
Zia
  • 467
  • 3
  • 15