Questions tagged [asp.net-core]
ASP.NET Core is a lean, composable and cross-platform framework for building web and cloud applications. It is fully open source and available on GitHub, and is currently in version 1.1.0. ASP.NET Core can be run both on .NET and .NET Core, and can be hosted on Linux and MacOS under .NET Core.
174 questions
4
votes
1
answer
87
views
Create/Edit Commands for Finance Agreements that involve document upload
I'm working on commands for creating and updating FinanceAgreement records in a .NET application. The goal is to streamline and clean up the document-handling logic.
Problem Description:
In our ...
0
votes
0
answers
37
views
Custom ASP.NET Core CookieAuthenticationHandler
I wrote a CustomCookieAuthenticationHandler because I don't like the way CookieAuthenticationHandler.HandleForbiddenAsync() ...
2
votes
1
answer
143
views
Refactor to get one more layer of abstraction for less repeated code
I might add more methods, but currently I have this design: So connectionString comes from IOptions pattern. Then for each ...
-3
votes
1
answer
83
views
Best practice code for payment integration [closed]
I am new to coding, and I am doing my best to write efficient and robust code. I am also trying to incorporate design patterns into my code. Could you please take a look at my repository and let me ...
2
votes
2
answers
492
views
Thread safe accessing memory cache using semaphore
I have a Web API and for some requests we are sending requests to a third party API that requires request authentication. It's a simple bearer token, which I'd like to reuse across requests, because ...
-1
votes
1
answer
239
views
Optimizing LINQ Query on C# Web API
Can someone help me optimize this code especially the LINQ query. It takes 8-12 seconds just to return a response when I'm calling the endpoint. Its super slow, and my whole endpoint call is taking ...
1
vote
4
answers
206
views
C# decomposition and refactoring of a very long Web Data Scraping Function with multiple different tasks using a Clean Architecture Pattern
I inherited a very long and messy C# function with a task to make it more readable and Clean Architecture Pattern friendly.
The primary goal of a function is to send an API request to an endpoint and ...
0
votes
0
answers
1k
views
Extend the login timeout in a ASP NET 7 application
My ASP Core web application was recently upgraded from NET6 to NET7. Almost zero problems except one, which still puzzles me.
With the "old" NET6 version, once an user log then app in (...
2
votes
1
answer
1k
views
Serilog logging extension methods
I've been using this extension in almost all of my projects. What's your opinion? Do you think there is something else to add or to be improved? The idea is to ignore all default ASP.NET messages that ...
2
votes
1
answer
171
views
Retrieving large batches of online game codes?
In my current solution, a user triggers my web API from a web application of mine first, then my web API calls a 3rd party web service, and the results/codes are displayed on the web application. In ...
2
votes
0
answers
180
views
POST-Redirect-GET in ASP.NET Core MVC preserving user input and validation messages (v2)
I have a multi-page form to submit and update an application for an event built using ASP.NET Core MVC. Each page of the form consists of the display information managed by the organizer (1) and the ...
2
votes
1
answer
507
views
POST-Redirect-GET in ASP.NET Core MVC preserving user input and validation messages
I have a multi-page form to submit and update an application for an event built using ASP.NET Core MVC. Each page of the form consists of the display information managed by the organizer (1) and the ...
2
votes
1
answer
164
views
Azure AD Role Based Authorization : Allow specific roles for all GET methods and another set of roles for POSTS
There is a need to authorize the Users based on their Roles, particularly a set of roles that should allow all GET operations and a second set that should allow all POST operations.
Eg:
All Get ...
1
vote
1
answer
146
views
Azure DevOps Git: Fork into another Repo using Azure DevOps REST API
In my Azure DevOps Project, I have a Git repository that I would like to copy to another Azure DevOps Project.
In other words, I should be able to copy the original repo into other Azure DevOps ...
3
votes
1
answer
278
views
Export and import work items from Azure DevOps
I'm working on an application that exports and imports work items from Azure DevOps. To import work items into Azure DevOps, I have written the following code.
Would you be able to review and make ...