37,950 questions
1
vote
1
answer
477
views
RabbitMQ Client .Net Core Timing Out under load after rabbitmq upgrade. Consumer System.TimeoutException
We have a system that was running RabbitMQ 3.8.5 with RabbitMQ.Client 5.2.0. Part of the way the system uses rabbit is by creating a consumer to wait for a specific command from a different executable ...
0
votes
0
answers
104
views
Issue with Running Python Script from .NET Web API Hosted on IIS
When I host my web API on IIS, the Python script does not execute as expected. However, the entire workflow functions correctly during local development and debugging in Visual Studio.
What I Have ...
1
vote
0
answers
72
views
Authentication cookie not included in the response header
I have a Blazor Web App that uses cookie authentication (not the built-in Identity). I'm trying to understand why when I authenticate the user directly in the application, the authentication cookie is ...
0
votes
0
answers
342
views
Two Factor Authenticator SignIn with API in C#
I have 2 projects: Client and API and use IdentityDbContext
When I login and enable 2FA, it returns true for the Client to navigate through Page LoginWith2fa
var result = await _signInManager....
-3
votes
1
answer
100
views
why don't Show EF Core 6, AppDbContext onModelCreating in modelbuilder.HasDefaultSchema("Schema name"); [closed]
why dont Show EF Core 6, AppDbContext onModelCreating in
modelbuilder.HasDefaultSchema("Schema name");
i tried different methods,
I almost asked the AIs too,
ChatGPT, Bing etc. but somehow ...
1
vote
1
answer
337
views
Get original GraphQL query string from HTTP request
I am working on a GraphQL backend service in C# (.NET8 Web Api), which is a proxy for an another GraphQL service (An existing black box application with a GraphQL API, unknown implementation). I have ...
0
votes
1
answer
73
views
Method Not allowed 405 not allowing post methods as get methods working
I have created a web api in asp.net web api as all methods work perfectly on localmachine but
throguh m siite where i hosted my site on vercel
when i call throgh this get methods work ...
-1
votes
1
answer
49
views
{ configureapplicationcookie } options do not change LogoutPath, LoginPath, Cookie.name and AccessDeniedPath
I have a strange story when I used it for the first time, it worked, but after that I don't know what happened. The problem occurs when you change the path for LoginPath, LogoutPath, AccessDeniedPath, ...
0
votes
1
answer
101
views
ASP.NET MVC / Web API : how to set a default header with a token, to be used across different controller class?
I'm a beginner in ASP.NET MVC / Web API.
I have an ASP.NET Web API with a login endpoint that returns a token. My endpoint login returns a json with the token and its expiration date. The usage of the ...
0
votes
0
answers
114
views
The oauth state was missing or invalid. in asp.net web api when trying to implament google outh
i am trying to implement google auth and i seem to missunderstand the auth flow , i looked through every sub and post allready and tried all the fixes there but nothing seems to work , i dont exectly ...
0
votes
1
answer
34
views
How to send POST call with payload in body from javascript to ASP.NET Web API with Windows auth enabled
I am creating an ASP.NET Web API using C# expecting a payload in the POST body. Windows auth is enabled on IIS.
public class GenericController : ApiController
{
[Route("api/{version}/{user}/...
0
votes
1
answer
152
views
Complex queries in Entity Framework Core
I have these two entities in EF Core:
public class Chat
{
public int Id { get; set; }
public string SessionId { set; get; } = string.Empty; // Could be sessionId or anything that indicate the ...
1
vote
1
answer
207
views
Cannot publish a blank 64-bit ASP.NET Web API 2 project in Visual Studio 2022
I am having difficulty publishing a new, blank ASP.NET Web API 2 project running on .NET 4.8.
I discovered in an actively developed project, of the same type, that even though the project builds ...
0
votes
1
answer
150
views
Migrating dynamic API Controller Execution Code to ASP.NET Core in .NET 8
I am currently migrating an application originally built on .NET 4.6.1 to .NET 8. The relevant piece of the application is an API Controller that receives a batch of API requests from the browser, and ...
0
votes
1
answer
442
views
How to Handle Cold Starts for .NET API on Kubernetes?
I'm experiencing significant cold start delays for my .NET API hosted on Kubernetes. The first API call to any endpoint takes between 500 to 1000ms, but subsequent requests to the same endpoint take ...
0
votes
1
answer
49
views
DotNet8 WebApi - Newly added controllers with [Authorize] attribute always returns 401 even if user is authorized
I have an existing Web Api project which works well, I can authorize and run the endpoints in controllers. But when I add a new controller and decorate with [Authorize] attribute as same as others, no ...
0
votes
0
answers
309
views
Failing to open connection to postgresql database using Npgsql
I'm failing to connect to PostgreSQL using Npgsql in my local environment I have checked each and every thing looks fine and I'm able to connect using my pgAmin and also I have managed to update ...
1
vote
1
answer
79
views
ASP.NET dont see cookies, though it is set on frontend React side
`I am writing fullstack app (ASP.NET and React) and now trying to implement Steam auth using AspNet.Security.OpenId.Steam
I already figured out how to set cookies, but when i try to check, if user is ...
1
vote
1
answer
123
views
Logging every request to a shared Log File from multiple IIS instances
I'm working on an ASP .NET Core 3.1 Web API project and encountering an issue with Serilog. The logs are written to the file only after the first request is made post-startup.
Here's a simplified ...
1
vote
2
answers
42
views
Authentication on actions not controller
I have a controller which it is like the following code :
[Route("api/[controller]")]
[ApiController]
[Authorize("Admin, OtherRole")]
public class MyController : ControllerBase
{
...
3
votes
2
answers
720
views
Access to Azure Keyvault inside Azure Container Instance WebApi
I would like to retrive the keyvault secrets using managed identity in web Api.
Creates Web APi with DefaultAzureCredential
Able to retrive the data using aboe code.
Built image and pushed into Azure ...
0
votes
0
answers
87
views
Web API Token Based Authentication Error : Authorization has been denied for this request
I'm developing an ASP.NET Web API. It runs smoothly without authentication, but when I try to access the API in Postman with username and password, I always get an error:
Authorization has been ...
0
votes
1
answer
62
views
System.Reflection.TargetInvocationException: "Expression 'dest => dest' must resolve to top-level member" when configuring AutoMapper profile
I'm encountering an exception when trying to configure AutoMapper in my ASP.NET Core application. The exception message is:
System.Reflection.TargetInvocationException: Exception has been thrown by ...
1
vote
3
answers
106
views
Web API JWT token unauthorized error inspite of passing token in authorization header
I created a sample .Net WebAPI core application to understand JWT implementation. The API was created and added JWT based authentication in it. The API returns the token from the token controller. But ...
1
vote
1
answer
595
views
ASP.NET Core 8.0 Web API on IIS 10 - Intermittent 404 Not Found
I recently published a .NET 8 Web API to IIS Windows server. At first I was getting errors showing
Failed to Load ASP.NET runtime
which I resolved by installing ASP.NET Core Runtime 8.0.5 Windows ...