373,420 questions
0
votes
0
answers
4
views
یک صفحه لاگین کامل در MAUI (.NET 8) که کاربر پسند باشه
Severity Code Description Project File Line Suppression State
یک صفحه لاگین کامل در MAUI (.NET 8) با ویژگیهای حرفهای بسازیم:
✅ چندکاربره با RememberMe (ذخیره یوزر و پسورد انتخابی)
✅ ...
0
votes
1
answer
28
views
"No operations defined in spec!" when using MMLib.SwaggerForOcelot to build combined swagger for Ocelot
This is my ocelot configuration...
{
"Routes": [
{
"UpstreamPathTemplate": "/api/test/{url}",
"DownstreamPathTemplate": "/api/{url}",...
Best practices
0
votes
3
replies
62
views
Apply [ApiController] to all controllers implicitly
Adding [ApiController] on a controller class has various benefits. Especially the automatic model validation and problem details parts.
The problem with this attribute is that it's easy to forget to ...
Best practices
2
votes
4
replies
70
views
How do I parse multipart content from an HttpResponseMessage?
I am using HttpClient in .NET 9 to get content that has a JSON part along with a base-64 encoded file. Reading the content as a string, I don't see a clear format that would ensure consistent parsing ...
Best practices
0
votes
0
replies
22
views
How to get Autofac Instance Per Request semantics in Asp.Net Core while keeping it idiomatic, i.e. not using tagged matching scopes?
In Asp.Net (not Core) we have InstancePerRequest which uses tagged matching child scopes.
In Asp.Net Core they deprecated InstancePerRequest in favour of InstancePerLifetimeScope which as I understand ...
1
vote
0
answers
34
views
appsettings.json not read after deploying to Minikube (values become empty, DB connection fails)
I'm running an ASP.NET Core application.
Everything works correctly when using Docker Compose — all values from appsettings.json load normally, and my services connect to Postgres and RabbitMQ.
But ...
0
votes
1
answer
54
views
ASP.NET/Angular/Azure: Why does refreshing the page still retrieves old data? The api returns correct data & I've set "no-cache"
To give context, I am using Azure Static Web App linked to GitHub, Azure Container App linked to Docker Hub & have Azure SQL database along with SQL Server setup. This is my first attempt in ...
0
votes
2
answers
63
views
My Ajax web method call in C# keeps showing an error: "401 Unauthorized"
I'm trying to call a simple static WebMethod in my ASP.NET Webforms page using jQuery Ajax, but it doesn't seem to be working. I've tried enabling anonymous authentication and other fixes suggested ...
0
votes
0
answers
18
views
Getting bad request error while trying to integrate Superset in asp.net website
We have an asp.net website based on 4.5.2 framework. I am trying to integrate the Superset dashboard into one of the .aspx page, but getting following error:
Error: {"errors": [{"...
2
votes
0
answers
139
views
C# .net cannot run in VS code
I use VS code (not VS cause i have linux) and have been trying to run my c# template from run and debug in VS code but it does not works and returns this error in output.
-----------------------------...
0
votes
0
answers
76
views
DevOps build errors referencing old package version no longer used
My site has two website projects. One of them references Microsoft.CodeDom.Providers.DotNetCompilerPlatform.
We have recently upgraded this from 3.6.0 to 4.1.0 as part of a wider upgrade project.
The ...
Best practices
3
votes
3
replies
87
views
C# CancellationToken across chain of api calls
I have the following application architecture:
FrontEnd → ApiServer 1 → ApiServer 2 → Database
So, the frontend calls a web server, which calls multiple API which make query on database.
What is the ...
0
votes
0
answers
47
views
I need to work with legacy web forms apps, but VS22 doesn't like the percent syntax in .aspx pages. I've been ordered to not change the markup
Error message:
Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Other solutions tell one to modify the markup syntax in various ways, but I've ...
1
vote
1
answer
69
views
asp.net tilde ~ paths not resolving on pages with a master page
I have a page Product.aspx that has a master page Main.master, both pages are in the root of the project (they don't belong to any folder). The problem is that the tilde path only works for the Main....
1
vote
0
answers
68
views
System.Net.WebSockets is missing messages/notifications
I am creating a lib to listen to server notifications (more than 100,000 requests per hour), when using WebSocketSharp it is receiving all 100,000 notifications but there is memory leak (server goes ...
0
votes
0
answers
40
views
.NET - How can I update downloading a .tiff file from .NET 4.5 to 8? [duplicate]
I'm currently working on migrating a project from .NET 4.5 to 8. One of the key functionalities of the old project is the ability to download a barcode of a given string:
Old functionality
public ...
-1
votes
1
answer
79
views
How to change the default HTTP scaler concurrency (10 requests) to 1000 in .NET Aspire?
I’m using .NET Aspire to orchestrate my services, and everything is deployed to Azure Container Apps.
By default for replication, Container Apps seem to use HTTP scaler with a concurrency target of 10 ...
0
votes
1
answer
99
views
Browser keeps showing Windows Authentication popup after obtaining JWT token in ASP.NET app
I have an ASP.NET application (on .NET 4.5.2) where I want to use combined Windows authentication and JWT token auth.
When the app starts, it calls an endpoint like this:
/api/auth/token
This ...
0
votes
1
answer
80
views
Using [FromQuery] with a .NET controller for an optional boolean query string parameter where presence alone should set it
.NET has [FromQuery] to get query parameters on the path.
For instance my/foo?bar=1 maps to:
public class MyController : Controller
{
[HttpGet]
public async Task<Whatever> Foo([FromQuery]...
0
votes
0
answers
44
views
Problem with populating Fast Report via .NET code
I am trying to populate my fast report with dummy data using .NET code
DataTable dt = new DataTable();
dt.Columns.Add("name", typeof(string));
dt.Columns.Add("days", typeof(string))...
1
vote
0
answers
54
views
WebDAV using SQL storage opens office document in read-only mode
I am building a proof-of-concept WebDAV server with SQL storage, not physical on disk storage in ASP.NET Framework. This server needs to integrate with an existing ASP.NET Framework application.
I’m ...
0
votes
0
answers
34
views
MSBuild - Publishing a WebForms project with references to other WebForms project
I have an ASP.NET webforms project (A) which references two other webforms projects (B and C) that I'm trying to publish with precompilation enabled from the command line with MSBuild using a publish ...
1
vote
0
answers
56
views
Dockerizing ASP.NET MVC application on .NET 4.5.2 - 404 from ManagedPipelineHandler on hitting an action method
I am trying to dockerize an existing ASP.NET MVC application running on .NET 4.5.2. I am using mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 as the base image (the base ...
0
votes
0
answers
69
views
.AspNet.Cookies not set in IIS virtual application when using OWIN cookie middleware with .NET Framework
I'm running a .NET framework 4.7.2 application using OWIN cookie authentication under IIS as a virtual application locally (e.g., https://example.test/cms/) but I end up in and endless redirect loop ...
0
votes
1
answer
95
views
Owin security could not handle callback "signin-oidc", Error 404 on ASP.NET MVC
I have a simple ASP.NET MVC app with .NET 4.8.
I want to use keycloak as security management and my app connect to it via openid connect protocol.
To do this, I've created a startup.cs class in my ...