37,950 questions
0
votes
0
answers
47
views
Legacy VB.NET Hide Stack Traces For Bad Requests To Web Service
I am working on a legacy Web Forms project written in VB.net. When an authorized client makes a bad request, my application response returns a full stack trace that I want to hide.
I have a redirect ...
0
votes
1
answer
108
views
How to restrict ASP.NET Web API from querying with different values
I have a third-party React page which makes some API calls to .NET backend. I need a way to restrict people from hacking API by changing values of the request.
When someone opens the third-party page ...
3
votes
0
answers
79
views
C# Web API File supported contentType types for audio
I have a WEB API in dotnet that returns a File
for example
var fileResult = File(wavAudioBytes, "audio/mpeg");
then return it
[HttpGet]
public IActionResult Get()
{
var ...
2
votes
1
answer
206
views
API Gateway with multiple instances of a same Web API
I am creating an ASP.NET Web API gateway which needs to communicate to legacy COM component business logic written in C++. So I am creating another Web API which internally gets data from COM ...
0
votes
0
answers
66
views
POST endpoint in Swagger responds with false error
I have a legacy API on .NET Framework 4.6.1. I've been asked to take a look at one of the POST endpoints and so as an initial step I tried running it against my test database in localhost.
I get a ...
1
vote
0
answers
66
views
Trying to intercept the "request is invalid" response from a C# Web API action
I have developed a Web API application in C#. Now other teams in my company have developed their own applications, mainly in Node, that make requests to endpoints in my API.
However, they do stupid ...
1
vote
1
answer
113
views
ASP.NET ASMX WebService custom namespace prefix; Building a dotnet service that communicates with both SOAP and REST services
I need to build a service capable of receiving SOAP messages and re-route those to a REST microservice.
The message sender cannot be modified but my service can (and it must I guess):
I decided to ...
0
votes
1
answer
82
views
Method userManager.FindByEmailAsync() returns object with empty UserName and Email
I had to extend IdentityUser model (and AspNetUser table of course) with some extra field (RegistrationDate) so I created ExtendIdentityUser model class. It works nice.
Then, I needed to change some ...
0
votes
0
answers
56
views
ElasticSearch is very slow
I set up Elastic Search about a month ago for my pet-project. Elastic Search is hosted locally on my machine on Windows. Everything was working fine. Now when I try to access it in any way it doesn't ...
0
votes
1
answer
116
views
LINQ Expression could not be translated when Using OData Framework with DTOs
I am new to Odata as well as EntityFramework, And I am trying to use OData with DTOs. My Entity Model have been defined something like
public Orders
{
public String OrderId{get; set;}
public ...
0
votes
0
answers
113
views
How to Retrieve Access Token in ASP.NET Core without Triggering Middleware Pipeline Recursion in JwtBearerEvents?
I am building an ASP.NET Core API that uses Azure Entra ID (formerly Azure AD) for authentication. I need to process the TokenValidated event in JwtBearerEvents to handle group overage scenarios. For ...
0
votes
1
answer
201
views
Web API add a Header parameter for all Endpoints in Swagger using NSwag+Owin
I wish to add a custom header parameter in Swagger for all my endpoints in my ASP.NET Web API application running ASP.NET 4.8 using NSwag.
I have found many, many references explaining how to do this ...
0
votes
0
answers
26
views
Run the Web Api project under api path with Angular
I’m starting a new project in Visual Studio 2022 using Angular and Web API, where Visual Studio creates two separate projects by default. However, the default template runs each project separately, ...
0
votes
1
answer
179
views
How to get access token and id token for google oauth?
I am using Blazor Webassembly standalone + Asp.Net Web Api(.Net8.0). I want to implement Google Authentiaction. I successfully got the authorization code but having a problemgetting the access token ...
-1
votes
2
answers
154
views
PostgreSQL stored procedure fails with dynamic parameters for date in Dapper
I'm using PostgreSQL with a .NET project, and I'm facing an issue executing a stored procedure through Dapper when using dynamic parameters to pass a DATE parameter.
The stored procedure is defined as ...
0
votes
0
answers
26
views
GoogleWebAuthorizationBroker AuthorizeAsyncCore on iOS (IPhone) from Middleware .net Core Web API
I'm using a solution involving similar code to that which is explained here: How do I set return_uri for GoogleWebAuthorizationBroker.AuthorizeAsync?
What I've discovered after getting the code to ...
0
votes
0
answers
54
views
Unable to hit POST request on REST based controller using .NET 4.8 framework
Connection controller:
using System.Web.Http;
using eQCsomWebsite.Models;
using eQCsomWebsite.Services;
using eQCsomWebsite.Services.implementer;
using System.Web.Services;
namespace eQCsomWebsite....
0
votes
1
answer
76
views
API endpoint not working for POST request
We have developed an API endpoint and it is not working on the production site, this endpoint works perfectly on local host or even using tools like NGROK with GET and POST request.
We have already ...
0
votes
1
answer
83
views
Guidance on building and integrating multiple Angular apps with ASP.NET Web API
We are currently building multiple applications, including some mobile-enabled ones, and are restructuring our project into a Hydra-like architecture with multiple interconnected applications centered ...
0
votes
0
answers
85
views
How to run an external exe in UserInteractive mode?
I have a situation that requires me to run an external console .NET framework app which in turn starts a Windows Forms application that embeds WebView2.
This external exe needs to be called from a ...
0
votes
1
answer
203
views
Why Use Refresh Tokens in Authentication? Can't They Be Stolen Like JWTs?
I'm implementing authentication in my app using ASP.NET Web API and JWTs. I’m trying to understand the purpose of refresh tokens and have some doubts about their benefits and security implications:
...
0
votes
1
answer
70
views
Check auth status of users in a Vue.js Frontend with an HTTPOnly JWT Token in ASP.NET Web API
I'm building a web application with an ASP.NET Web API backend and a Vue.js frontend. I've implemented JWT authentication and am storing the access token in an HTTPOnly cookie for security reasons. ...
0
votes
1
answer
127
views
WebAuthN Won't Display rp name
I've tried over and over to get passkey auth to show the rp name instead of the rp id. Initially I had my backend url (rp id) set to a subdomain (api.project.ca) and my frontend was projectname....
2
votes
2
answers
148
views
REST API design: Grouping together multiple POST or PUT calls?
I have a REST API with the usual sort of structure
/customers // get a list of all customers
/customers/22 // get customer with the ID 22
/customers/22/orders // get ...
0
votes
1
answer
431
views
How to translate Workday SoapUI API calls into Postman and C# / .NET with same endpoint but different operation?
I am working on API project using Workday APIs. Based on the data given by Workday, I could test API calls from Soap UI and get responses back.
Here under this Workday Revenue Management Module, we ...