325 questions with ASP.NET API tags

Sort by: Updated
2 answers

Question about clean architecture

I read article about clean architecture (in microsoft docs) and I have question about validation. In the article said that Application layer must not have any dependencies from external libraries and frameworks. But I see examples projects on github…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,770 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,447 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-26T18:30:20.3033333+00:00
Hikljh Dima 20 Reputation points
answered 2024-01-29T23:01:54.85+00:00
Bruce (SqlWork.com) 63,421 Reputation points
1 answer

Generate custom PasswordHash with Microsoft.AspNet.Identity

Hi , I'm using VS2022 and I want to override the Default PasswordHash. I want to include when the user is created in the Hash Password the username for example. I found some code  but it is for the Core. And I'm not using the core I have created a …

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,770 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,447 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-19T13:59:42.4433333+00:00
Zacharias Karasavvas 0 Reputation points
edited a comment 2024-01-25T06:26:17.8233333+00:00
Lan Huang-MSFT 29,166 Reputation points Microsoft Vendor
1 answer

IIS - Rewrite Module from 200 OK to 201 Accepted

In IIS version 10, I installed Rewrite Module and I am trying with the above XMLs the following action. I want to set "201 or 202 Active" status instead of default 200 OK to all successful requests (only when my api should return 200…

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,447 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-22T19:43:55.25+00:00
Dimitrios Michas 0 Reputation points
edited an answer 2024-01-23T03:06:24.39+00:00
Sam Wu-MSFT 7,446 Reputation points Microsoft Vendor
5 answers

C#: The dreaded “A generic error occurred in GDI+.” Exception

I have googled this a lot but not found any good solutions. Users upload images to the server via an Asp.Net API and the code below saves the files to disk. This works most of the time (1000s) but sometimes I get this GDI exception. This uses .net…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,808 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2022-10-19T03:01:08.97+00:00
moondaddy 911 Reputation points
answered 2024-01-17T23:06:16.9+00:00
Iuri Jacob 0 Reputation points
1 answer

We are not able to access a file in the web api

We have a csv file that is in the project directory. After publishing it is showing already in azure and we can access it through the developer tools. But in the api we are getting file not found error we tried putting the full path hard coded also but…

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-12T11:33:20.19+00:00
Pavan Pathak 0 Reputation points
answered 2024-01-16T11:50:48.45+00:00
Ken Kam Hung, Lin 91 Reputation points
1 answer One of the answers was accepted by the question author.

Microsoft Identity is redirecting WebAPI calls to microsoftonline.com

We are trying to build an application with both razor pages and API endpoints and an Angular app to access the API endpoints. Web Application #1 I've been able to connect to Entra ID from the razor page side of the primary AspNet Core web project, and…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-02T21:21:26.74+00:00
Guisinger, Dan 25 Reputation points
accepted 2024-01-12T19:31:40.76+00:00
Guisinger, Dan 25 Reputation points
0 answers

How to nicely solve self-referencing object update error?

In my project I have a bunch of models, that are all derived from the class 'Entity'. Simplified, this means they all have the following properties: public Guid Id { get; set; } public DateTime Created { get; set; } public required User CreatedBy { get;…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,808 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-11-08T10:10:32.9833333+00:00
Miles 0 Reputation points
commented 2024-01-10T19:47:54.39+00:00
1 answer

Question/Suggestions on using a Windows Service or Hangfire

I plan on either doing a Windows Service, or using Hangfire (right in my web api), for continuously gathering new security event logs similar to that of the Windows Event Viewer. Looking for feedback/suggestions on doing it with an event listener. What…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-06T23:27:13.3966667+00:00
muttBunch 100 Reputation points
answered 2024-01-07T18:39:32.8766667+00:00
Bruce (SqlWork.com) 63,421 Reputation points
2 answers One of the answers was accepted by the question author.

Fetch data for a specific field in Web API C#

Hello, I have a Json URI which I am using as a data source. I am writing a web api wherein I need to retrieve the data for any of the specific field which user inputs. For e.g, below json is my data source and I need to fetch data only for table_no. So…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2024-01-03T23:40:13.5766667+00:00
Abdeali Mandviwala 20 Reputation points
accepted 2024-01-04T23:30:10.3366667+00:00
Abdeali Mandviwala 20 Reputation points
2 answers

Asp.net api Endpoint, IAsyncEnumerable stream being buffered

Hello, I'm using .net 7, http://asp.net core api w/controllers and I"ve tried with minimal api on VS 2022. Using c# to stream using IAsyncEnumerable some simple text line by line. Ive tried a simple obj. Ive tried ints. No matter what I've tried the…

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,283 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-10-15T18:58:45.21+00:00
ideplotest 0 Reputation points
commented 2023-12-29T06:20:47.0066667+00:00
Hazy Fish 0 Reputation points
1 answer One of the answers was accepted by the question author.

How to fix "Register the constraint type with 'Microsoft.AspNetCore.Routing.RouteOptions.ConstraintMap"?

Hello! I know this question has several posts with multiple answers but in my case I haven't found the solution. I'm building a Web Api with NET 8 My Web Api has swagger I'm using Dependency Injection, Service layer, UnityOfWork and Repository…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,770 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-27T01:24:44.01+00:00
David Lerma 20 Reputation points
accepted 2023-12-27T20:06:13.4266667+00:00
David Lerma 20 Reputation points
2 answers

How can i use signInManager in MVC project without using dbcontext and instead communicate with ASP.NET API

So i have a question when i made a MVC project i used signInManager to sign in and also to check identity by checking his role to see if he is a user or admin and it worked with me but my question is how to use it with API + MVC i have made API and…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,447 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-22T23:51:30.25+00:00
Faris Mohamed 0 Reputation points
answered 2023-12-23T03:28:56.2533333+00:00
Bhavesh Sharma 0 Reputation points
2 answers One of the answers was accepted by the question author.

Can you use an array inside of .Contains() via LINQ?

Please see the very bottom in the Answers section from me, I updated question down there rather than removing this here. A co-worker and myself wrote a very small app to store logs in a SQL database for 6 months. I'd like to add filtering parameters to…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
729 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-21T07:32:08.6533333+00:00
muttBunch 100 Reputation points
edited the question 2023-12-23T01:33:34.0533333+00:00
muttBunch 100 Reputation points
1 answer

rate limit in web api

Is there any way to implement rate limiting of web apis in .Net framework 4.x? There seems to be packages in latest .net versions as well as .net core. However looking for one for the .net framework

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,770 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-21T13:20:16.4433333+00:00
ms2 0 Reputation points
commented 2023-12-22T06:31:27.59+00:00
Lan Huang-MSFT 29,166 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

How to select Manage NuGet Packages from VS Code

Working state: MS Learn --> PL-400 --> Introduction to developing with Microsoft Power Platform --> Introduction to extending Power Platform --> Exercise - Create a custom API --> Step 13 - "Right click on the CustomAPILab Project…

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-20T11:57:05.3333333+00:00
Antonios Kokiantonis 105 Reputation points
accepted 2023-12-22T05:47:20.5666667+00:00
Antonios Kokiantonis 105 Reputation points
0 answers

WSDiscovery 'Hello' message isn't recognised by dasHost.exe

I'm trying to use WSDiscovery in .Net8. This isn't supported directly but I have got a client application working that is able to send probe requests and receives probematch replies from dasHost.exe However I can't manage to get my server application to…

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-15T14:00:27.7133333+00:00
Stephen Richardson 41 Reputation points
edited the question 2023-12-18T08:08:34.18+00:00
Jiale Xue - MSFT 44,061 Reputation points Microsoft Vendor
4 answers

How to fix update problem in concurrent request in ASP.NET Web API 2

I am working on an ASP.NET Web API 2 project with .NET Framework 4.6.2. When I send two concurrent requests with the same parameters from Postman, only one record is updated in the database, even though there should be two. I have included screenshots of…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,447 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,808 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-04T15:39:18.34+00:00
Cenk 996 Reputation points
edited a comment 2023-12-12T12:54:14.2366667+00:00
AgaveJoe 28,026 Reputation points
1 answer

Is it possible to add delay to concurrent requests in ASP.NET Web API 2?

I am using WebApiThrottle for rate limiting in my ASP.NET Web API 2 project, but I am having problems with concurrent requests. Instead of sending 429 too many requests responses, is it possible to delay concurrent requests, for example, allowing only…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,770 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,808 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-10T13:28:56.5266667+00:00
Cenk 996 Reputation points
commented 2023-12-11T05:25:17.8933333+00:00
Lan Huang-MSFT 29,166 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Retroactivly scaffolding identity into both my backend and frontend so that it all works

Hello! I've made 3 projects in my solution. one is my Api project, one is my blazor project and one is a class library for my Dtos. Both my backend and frontend reference the class library. I wanna retroactivly scaffold identity into my backend…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,499 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,543 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-12-05T15:25:56.6466667+00:00
!Programming-proffesional 20 Reputation points
edited a comment 2023-12-06T08:36:52.2266667+00:00
!Programming-proffesional 20 Reputation points
2 answers

Connection to API using FrameWork 4.8

Good morning, I'm trying to connect to an API, but the example provided uses .net 6.0, but my project is using FrameWork 4.8, for example, I don't have the Text.Json library and I believe I'll need another one to get the answer. request.Content = new…

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
325 questions
asked 2023-11-06T13:35:03+00:00
Fábio Freitas 0 Reputation points
commented 2023-11-23T01:25:42.07+00:00
Lan Huang-MSFT 29,166 Reputation points Microsoft Vendor