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
0
votes
1 answer

How to get correct GPU device id for Microsoft.ML.OnnxRuntime.DirectML (.net core 3.1)?

I am using Microsoft.ML.OnnxRuntime.DirectML nuget package for image classification like this: var options = new SessionOptions(); options.AppendExecutionProvider_DML( 1 ); // deviceId goes here var session = new InferenceSession(…
Omni
  • 31
  • 3
0
votes
0 answers

Redirect from HandleRequirementAsync in .net core 3.0

I am in process of migration from .net core 2.1 to 3.0. In my previous code, I was redirecting to login page at some condition using var redirectContext = context.Resource as AuthorizationFilterContext; redirectContext.Result = new…
0
votes
1 answer

How to send chosen radio button value to modal in asp.net core razor

I'm implementing asp.net core 3.1. In my razor i have written some code like below for making some radio buttons and depending to which radio button user chose, if user clicks the following div, it should show related data on a modal.
MinaMRM
  • 111
  • 7
0
votes
2 answers

ASP.NET Core: How to add a second model to my View

my index view has a model that looks like this: @model IEnumerable and is used by this: @foreach (var item in Model) { @Html.DisplayFor(modelItem =>…
Toasty
  • 722
  • 1
  • 18
0
votes
1 answer

OData filter on enum

I'm trying to use OData with a .NET Core WebApi project. Since I want to control the format of the output I'm taking a probably not very conventional approach and in my action I'm receiving a ODataQueryOptions input that I'm applying to my data…
AndreiC
  • 1,410
  • 3
  • 15
  • 30
0
votes
0 answers

Blazor WebAssembly with index file configuration logic causing AmbiguousMatchException

I am creating a Blazor WASM and I need to include logic within the index.html file to load different css/js files and apply various css styles to body tag based on some conditions. However since the root file is static (www/index.html) and the app…
OjM
  • 735
  • 2
  • 10
  • 21
0
votes
2 answers

ASP.NET Core routing return 404

I am creating a web api using ASP.NET Core 3.1 and am trying to route URL to controllers. So far I have a basic controller like this: [Route("abc")] [ApiController] public class ABCController : ControllerBase { // GET:…
0
votes
2 answers

Azure Virtual Applications can't communicate

I have an Azure app service with a single custom domain. Within the app service, I have several virtual applications deployed. In specifically two of these virtual applications (let's call them app1 and app2), they need to communicate with each…
0
votes
0 answers

Html.Raw() not effective on anchor tag helpers in source page

Using ASP.NET Core 3.1 MVC, I tried to generate my links as below (notice using non English language, RTL I mean)
0
votes
0 answers

.net core 3.1 cors policy put delete

I have a .net core 3.1 web api application which is runnig on iis. And a react app on the client.I cant figure the cors policy Post and get requests are fine,but put and delete failed with cors error like this Access to XMLHttpRequest at…
0
votes
1 answer

Cannot access a disposed object. with SignalR and Timer Manager

I wanna make my function send data as a real time (every 2 seconds or once there is change in the database table ) but the problem is there is Exception keep appread in my below code. The exception details are: 'Cannot access a disposed object. …
3202User
  • 371
  • 4
  • 19
0
votes
0 answers

BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)

I am using a .NET Core 3.1. When I run the project locally, it works fine when I publish it to my Windows Server (windows server 2016) I am getting the following errors: Here is my error log file: info: Microsoft.Hosting.Lifetime[0] …
0
votes
1 answer

How to intercept messages in Bot Framework v4 for logging, using C# Core 3.1

We found this documentation explaining how to intercept messages in bot framework v3: https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-middleware?view=azure-bot-service-3.0 We want to do exactly that, only in v4 of the…
Martijn
  • 454
  • 4
  • 19
0
votes
0 answers

Add identity to Asp.net core MVC when JWT is implemented in WebAPI in same project

I have a single Asp.net core project with Web API and a MVC , I am accessing WebAPI from MVC using httpclient and I am using JWT authentication for the API controllers. All works fine ,except the I now don't have a authentication in my MVC project…
0
votes
1 answer

Child Table Properties are not fetching in ef core inheritance

i have following entities.. public class Paper { public int Id { get; set; } public string PaperCode { get; set; } ... } public class MCQPaper : Paper { public ICollection Questions {…