Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
52 views

Is there anyway to read from a request body directly in an action without middleware?

I want to be able to read a request body in an action while still also using default MVC behavior, which involves posting with a [FromBody] parameter. As far as I know I need middleware to accomplish ...
SventoryMang's user avatar
  • 10.4k
0 votes
0 answers
34 views

i want text of label when it in datalist

in .net , i have a problem . i want the text of label in datalist and i cant use id because its in datalist and its id is not available in c# or js .i don't can use for to find lable in datalist my ...
amir aabas rafighi's user avatar
-2 votes
0 answers
35 views

In C# which library is faster to use read and write Excel or CSV? [closed]

I'm an intern, and right now I have an Excel sheet assignment. I therefore need the data to be retrieved from an Excel sheet or CSV file. I now use the Microsoft.Office.Interop.Excel library, however ...
Sri's user avatar
  • 1
0 votes
1 answer
24 views

How does OpenIdConnectEvents get overrided?

below is the source code: https://source.dot.net/#Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs,1288 where await Events.AuthorizationCodeReceived(context); must exchange ...
secondimage's user avatar
0 votes
1 answer
26 views

C# Swagger HttpPost raw urlencoded body

I am building an API in C#.Net using Controllers and utilising Swagger but I have the need for accepting an arbitrary set of key-values in a POST and cant find out how to get swagger to show an input ...
Christian's user avatar
  • 3,822
0 votes
0 answers
36 views

Using multiple JWT schemes with SignalR WebSocket Hub in ASP.NET Core 8.0

I am unable to get claims because user is not authenticating while connecting to signalr web socket hub. I have sent the token in query string as mentioned here. I want to use multiple JWT scheme ...
Ghazanfar Khan's user avatar
0 votes
1 answer
17 views

The required antiforgery header value "RequestVerificationToken" is not present

I'm trying to implement CSRF between a Next.js frontend and a .NET backend API. First, the frontend app gets a CSRF token from the API. The API returns a cookie with the antiforgery token. antiforgery....
ngruson's user avatar
  • 1,298
0 votes
0 answers
21 views

MVC pages are not running with ReactTS

We have a web application which runs on .NET 8 (recently we migrated from 5 to 8). Now the team is planning to build new screens in ReactTS and merge these screens with the existing .NET 8 web ...
Gopi's user avatar
  • 102
0 votes
2 answers
34 views

How to Dynamically Set Optional Properties in Multiple Request Models in ASP.NET Core Web Api

At my workplace, I’ve been tasked with refactoring some code in an ASP.NET Core Web API application. In the application, I have multiple request models where some models include properties like UserId,...
Mehdi Raji's user avatar
0 votes
0 answers
36 views

Downloading a zipped version of a folder

I am trying to download a zipped version of a folder by the name XSLT. This is a code that I've written, however the downloaded xslt.zip file cannot be unzipped. When I use a third party application(...
Loch's user avatar
  • 25
0 votes
1 answer
32 views

How to separate dependency configuration from UI project of an ASP.NET Core Blazor Web App?

I have a Blazor Web App with the Server hosting model in .NET 8 with the WebApplication.CreateBuilder minimal hosting model. In the solution I use multiple library projects to foster a clean ...
Desty's user avatar
  • 2,756
0 votes
1 answer
45 views

In ASP.NET Core, Can't create user due to this error. The instance of entity type cannot be tracked because another instance with the same key value

UserController [HttpPost] [ValidateAntiForgeryToken] public async Task<IActionResult> Create(CreateUserDetailsForm createUser) { try { // Generate a unique UserID ...
Erck's user avatar
  • 33
0 votes
1 answer
41 views

Replace existing action routes in ASP.NET Core

I have my ASP.NET Core 8 project that references to external project that contains the following controller: public class AccountController { [HttpGet] [AllowAnonymous] public async Task&...
DotCat1985's user avatar
0 votes
1 answer
40 views

How to preserve state in Blazor 8 with static SSR

I have Blazor Web App, interactive mode is Auto and location per page/component. Since App, Routes and Layouts are rendered statically on the server, every navigation causes BrowserInfo(registred as ...
Bruce's user avatar
  • 11
0 votes
0 answers
17 views

Reproduce MapForwarder logic with MapReverseProxy - YARP

I have a legacy ASP.NET MVC application which I'd like to incrementally migrate to ASP.NET Core 8 app using YARP. Imagine, that my legacy app is hosted under url foo.com, and my proxy app is hosted ...
Yehor Androsov's user avatar

15 30 50 per page
1
2 3 4 5
2770