373,419 questions
0
votes
0
answers
34
views
ASP.NET WebForms: Adding StaticFileModule Rule for XML causes “Duplicate Entry” error and breaks Index.aspx
I'm running into a specific issue with my web.config when trying to serve XML files.
As soon as I add this rule:
<add name="XmlFile" path="*.xml" verb="GET,HEAD"
...
-2
votes
0
answers
49
views
Why doesn't my .NET website support HTTP/3 in Chrome/Firefox? [closed]
I have a .NET website running on an internal IIS10/Windows Server 2022 machine. It has an internal SSL cert authorised by our domain. It works with HTTP/1.1 and HTTP/2.
It's configured to pass an alt-...
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 ...
0
votes
1
answer
76
views
Error in flush at downloading file with VB.Net
I'm trying to download files through a popup window. Most of files download correctly, but some one through this error:
Error in /Controladores/Descarga.ashx?guid=4b5050f6-2f69-41e1-8bd6-1113686e9575
...
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
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 ...
Advice
0
votes
2
replies
55
views
Continuous scrolling grid (Like Excel)
I am looking for a freeware grid control for ASP.NET C# Webforms. It would behave similar to Excel.
The rows will be sequential dates, and the columns are my equipment numbers.
I want to be able to to ...
0
votes
1
answer
53
views
ASP.NET Controls Don't Span Bootstrap Columns
I am using Bootstrap 3.5 with ASP.NET controls (Visual Studio 2022). I have an ASP.NET:TextBox in a Bootstrap column. While an HTML input tag spreads across the entire Bootstrap column, left to right, ...
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 ...
Tooling
0
votes
0
replies
26
views
Any way to codegen a C# client from an API specification that basically uses dynamic typing?
I was trying to generate a client from the OpenRouter API reference, that can be found in their typescript-sdk github, .speakeasy/in.openapi.yaml :
https://github.com/OpenRouterTeam/typescript-sdk/...
0
votes
1
answer
210
views
What’s the most efficient way to map large entity models to DTOs in ASP.NET Core without using AutoMapper? [closed]
I'm working on a high-performance ASP.NET Core Web API where each request can return hundreds of entity records. Each entity includes multiple navigation properties and nested objects.
Currently, I’m ...
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....
0
votes
0
answers
50
views
Oracle.Web.Security.OracleRoleProvider fails with wallet-based TLS 1.2 connection on Windows Server 2012 R2 and 2022 (works locally)
Problem Summary
We’re currently blocked in production on OCI VMs (Windows Server 2012 R2 and 2022) when using Oracle.Web.Security.OracleRoleProvider to authenticate against an Oracle Autonomous ...
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 ...
2167
votes
42
answers
816k
views
How do I format a Microsoft JSON date?
I'm taking my first crack at Ajax with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string ...
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
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": [{"...
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 ...
1472
votes
31
answers
813k
views
JavaScriptSerializer - JSON serialization of enum as string
I have a class that contains an enum property, and upon serializing the object using JavaScriptSerializer, my json result contains the integer value of the enumeration rather than its string "...
0
votes
0
answers
87
views
HTTP post request keeps returning Error 400
So long story short, in my ASP.NET application I am making a post call where I supply JSON content like this below.
using (HttpClient Client = new HttpClient())
{
var Request = new ...
743
votes
53
answers
1.7m
views
The request was aborted: Could not create SSL/TLS secure channel
We are unable to connect to an HTTPS server using WebRequest because of this error message:
The request was aborted: Could not create SSL/TLS secure channel.
We know that the server doesn't have a ...
340
votes
27
answers
331k
views
You must add a reference to assembly 'netstandard, Version=2.0.0.0
The project is an ASP.NET MVC Web App targeting the .NET Framework 4.6.1.
All of a sudden (some NuGet packages were upgraded) I started to get the following error during runtime:
CS0012: The type '...
1
vote
1
answer
95
views
Moq: how to create a HttpRequest object containing a HttpPostedFile?
I am working with ASP.NET/.NET 4.8 application.
My action method is as follows:
public class TestController: System.Web.Http.ApiController
{
// pseudo code
public async Task<...
741
votes
36
answers
450k
views
How do you create a dropdownlist from an enum in ASP.NET MVC?
I'm trying to use the Html.DropDownList extension method but can't figure out how to use it with an enumeration.
Let's say I have an enumeration like this:
public enum ItemTypes
{
Movie = 1,
...