ASP.NET Core 5 is the current version of ASP.NET Core, built on top of .NET 5. Use this tag for questions specifically about ASP.NET Core 5 and ASP.NET Core 5's formal specification. Do also include the general [asp.net-core] tag.
Questions tagged [asp.net-core-5.0]
311 questions
4
votes
1 answer
Can I safely delete references to .pdb files?
I am using ASP.NET Core 5.0 since it came out a short while ago and I noticed something strange today.
I crafted an installer for my software, which automatically filters out each .pdb file that slipped into my release build. A mechanism that never…
![](../../users/profiles/11310222.webp)
TostMaster
- 114
- 7
3
votes
1 answer
Login reset/lost in asp.net core containers in kubernetes
newbie to containers and coming back to asp.net in nearly a decade and i assumed this would be answered somewhere already but can't seem to locate it !
I have a simple asp.net app running on 3 nodes, the login is per node apparently and is lost when…
![](../../users/profiles/135852.webp)
Kumar
- 9,481
- 10
- 74
- 126
3
votes
1 answer
Disable precompiled views on development when using "AddControllersWithViews()"
I am developing ASP.NET Core 5.0.1 project and I want to know how can I disable precompiled views while I developing. It takes long time to reload page if I change some html code and I don't want that. I know it is useful at product but I want to…
![](../../users/profiles/13177166.webp)
serhattsnmz
- 87
- 8
3
votes
0 answers
How can I avoid the Service Locator pattern when using Blazor and Entity Framework?
Anyone just starting out with Blazor Service Side with EF will come across this guidance:
https://docs.microsoft.com/en-us/aspnet/core/blazor/blazor-server-ef-core?view=aspnetcore-5.0
It makes two key points:
Do not use DI to inject your…
![](../../users/profiles/16082.webp)
Brian MacKay
- 28,374
- 14
- 82
- 116
3
votes
1 answer
User.Claims is empty after upgrading from ASP.NET Core 3.1 to ASP.NET 5.0
After upgrading from ASP.NET Core 3.1 to version 5, context.User.Claims is empty in
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, MyRequirement requirement)
in
public class MyRequirementHandler :…
![](../../users/profiles/621366.webp)
peter
- 11,751
- 6
- 52
- 89
3
votes
1 answer
Azure Devops - Compatibility problems moving from .NET Core 3.1 to .NET 5 at Nuget Package
I have a .NET Core solution which was running well using .NET Core 3.1 using a Pipeline on Azure Devops. Everything was working fine on the Pipeline.
After moving from .NET Core 3.1 to .NET 5.0, I started to have some strange troubles running the…
![](../../users/profiles/8426602.webp)
Rafael Cronemberger
- 45
- 1
- 5
2
votes
2 answers
System.Text.Json: Get the property name in a custom converter
Deserializing using JsonSerialize.DeserializeAsync and a custom converter, e.g.
public class MyStringJsonConverter : JsonConverter
{
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions…
![](../../users/profiles/2827823.webp)
Ason
- 79,264
- 11
- 79
- 127
2
votes
1 answer
How to block other data in ASP.NET Core 5.0
I have a project which contains Company and Agency users.
I have a problem while I'm trying to show their data. For example: the agency can see other agency's data if they change's the value on the web browser searchbar. I want to block that…
![](../../users/profiles/14895430.webp)
BerkGarip
- 159
- 1
- 11
2
votes
0 answers
Only one async task operation at a time per a symbol
SubscribeToKlineUpdatesAsync is a web socket stream event handler receiving data on each second from Binance. I have a long-running operation for 10 seconds inside it. It's separated into a task, because I don't want it to block any incoming price…
![](../../users/profiles/13677853.webp)
nop
- 1,497
- 1
- 3
- 27
2
votes
1 answer
Is .net core 5.0 production ready for azure app services
In the azure portal for an app service you can now choose .Net 5 (Early access). What does the early access mean? Is it ready for production or should we wait?
![](../../users/profiles/2764813.webp)
forsmyr
- 304
- 2
- 12
2
votes
3 answers
ASP.NET Core 5 MVC/RazorPages and WebAPI projects in same solution
Many sites are split in two:
www.example.com: a public MVC / RazorPages server-rendered app for guests
app.example.com: a private WebAPI app for customers and admins (accessible by a SPA)
These two apps share lots of stuff, e.g. code, database,…
![](../../users/profiles/9971404.webp)
lonix
- 4,787
- 1
- 29
- 74
2
votes
1 answer
How can I serialize a Newtonsoft JToken to JSON using System.Text.Json?
In the process of upgrading to ASP.NET Core 5, we have encountered a situation where we need to serialize and return a Json.NET JObject (returned by some legacy code we can't yet change) using System.Text.Json. How can this be done in a reasonably…
![](../../users/profiles/3744182.webp)
dbc
- 80,875
- 15
- 141
- 235
2
votes
1 answer
How do I disable automatic model binding for a specific ASP.NET Core 5.0 Web API action?
I have a third-party proprietary application, for which I need to write an API endpoint in my ASP.NET Core 5.0 web API application.
The third party application sends out an HTTP post request, with only binary data in the request body, alongside the…
![](../../users/profiles/1016105.webp)
burnersk
- 2,748
- 4
- 24
- 49
2
votes
1 answer
ASP.NET 5 - TypeLoadException - Could not load type 'WebAssembly.JSInterop.JSCallInfo' from assembly 'Microsoft.JSInterop.WebAssembly
I have created a new ASP.NET 5 MVC web application which hosts a razor class library with some .net blazor wasm components and a 3rd party library called Elsa. Everything seems to work OK, however when I try to load the Elsa homepage I get the…
![](../../users/profiles/90890.webp)
bbqchickenrobot
- 3,365
- 3
- 38
- 62
2
votes
3 answers
How to get user input parameters in my authorization policy requirement in ASP.NET Core 5.0?
I want to authorize users to see only their own resources (e.g: Audits entity). So in the AuditController I have:
[MyAuthorize(Policy = nameof(ValidUserToSeeAuditAuthorizationHandler))]
[HttpGet]
public async Task>…
![](../../users/profiles/3682691.webp)
TheMah
- 109
- 1
- 10