Category "asp.net-core"

.Net core app runs with EXE but does not run on IIS

I have a .Net Core 6 app which runs fine locally, it also runs fine when I manually start the exe in the publish folder. However when I run on IIS, it gives the

How to use class object instead of using JObject in .NET Core

I want to return C# class object instead of using JObject in here. Could someone can tell me how to use it. private async Task<JObject> GetReceiptById(str

Prevent authentication bypass via response manipulation with ASP.NET Core Identity implementation

Web application has asp.net core identity implementation, in security testing of our application vulnerability is found-authentication bypass via response manip

Decorator @property on ASP net core like in django

The thing is that like in Django which you can add model properties without changing the model class using the @property decorator. I'm trying to achieve same w

Why are SwaggerResponse and SwaggerResponseExample complaining about HttpStatusCode?

Every example of SwaggerResponse and SwaggerResponseExample I found uses HttpStatusCode as is, but when I use it like this: [SwaggerResponse(HttpStatusCode.BadR

How to suppress compiler errors within vctmp.cshtml files in Visual Studio?

Whenever I open a temporary cshtml file or compare the difference between the files, the compiler shows a bunch of errors. It's unable to resolve razor syntax d

Convert Json to List of Object

I am calling an API using: HttpClient client = new HttpClient(); HttpResponseMessage response = await client.GetAsync(path); String content = await response.C

How to specify defaults for SwaggerResponse and SwaggerResponseExample?

Is there a way to specify the default response example in Swagger similar to the ProducesDefaultResponseType like this: [ProducesDefaultResponseType(typeof(Prob

SignalR firing OnConnectedAsync for users in a hub on another machine

Our Azure SignalR application is a bit of a hybrid, outgoing messages go into ActiveMQ then get picked up by a listener in a hosted service that receives them a

Registering Class Settings into Azure Function App via Dependency Injection

I'm in the process of upgrading one of our Azure Function Apps from .NET Core 3.1 to .NET 6. As a result, I need to implement dependency injection. Our project

How to specify datasource id to scheduler telerik ASP.NET Core

I need client-side filtering with Scheduler. I wish to use Filter with Scheduler. For this, I need to specify datasource id to Scheduler. Different other compon

Using Asp.Net Core Viewbag

Layout.cshtml @{ var menus = (IEnumerable<WebApplication.Models.TopMenu>)ViewBag.menus; } <div class="col-md-8"> <!-- Menu Partia

Bind custom attribute value to route constraint

How do I bind a custom attribute value to a route? What I want: [ApiController] [CustomAttribute("value")] [Route("{customAttributeValue}/[controller")] public

C# LINQ Filter records in child tables

I have a main table "SALES" and two secondary tables "PRODUCTS" and "SERVICES", I need to select only the records in "SALES" that contain some product or servic

asp.net core binding null in controller post request (list with inside elements lists in view)

I have a view with a list of items that among their properties have a list of items (in View asp.net core). I use a generic list to have common properties that

AppInsights telemetry not co-existing with SeriLog logging

my Program.cs is configured like this using Infrastructure; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Au

i can not pass parameters to backend ( from Ajax to IActionResult or JsonResult) .net core 5

i have problem i can't pass params to backend use fech or ajax call , but from another PC i can pass params, here is a sample from code Backend : [HttpPost]

How can I make my database auto update a column when the date in another column reaches the current date?

I have created a asp net core web application that implements an online system of borrowing books from a library. I have created a table with the following stru

Creating public PASETO token in ASP NET Core

I'm using Paseto.Core Nuget from https://github.com/daviddesmet/paseto-dotnet, and I'm trying to create v4 public PASETO token with this. My code: public async

ASP.NET Core - JsonSerializerOptions.DefaultIgnoreCondition not working for IEnumerable<T>

I've one ASP.NET web app running over .NET Core 3.1 into one AWS Lambda; On Startup.cs I had this configuration: services.AddControllers().AddJsonOptions(opt =&