373,419 questions
0
votes
0
answers
17
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" ...
1
vote
2
answers
9k
views
How to configure a WCF service with basicHttpBinding and windows authentication and binary encoding
There are lots of existing questions/answers with subsets of my question (basicHttpBinding with Windows Authentication, using custom bindings, specifying binaryMessageEncoding). However, there are no ...
9
votes
5
answers
6k
views
How to Add JWT Token Support Globally in Scalar for a .NET 9 Application?
I'm working on enabling Scalar in my .NET 9 application and need to configure it to use JWT tokens globally, similar to how Swagger allows adding JWT token authentication globally. However, I couldn't ...
0
votes
1
answer
11k
views
How to set path in config file
I have a test which runs a script. It gets the path from the app.config file:
<scriptsSectionGroup>
<scriptsCollection>
<scripts>
<add name="TestScript" path="C:...
-1
votes
1
answer
50
views
Preserve pages data in multi forms page
I know similar question already asked, but my question related to saving state of the page. I use same model for simplicity. Assume I have the following model:
public class LoginRegisterViewModel
{
...
-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-...
14
votes
6
answers
270k
views
C# function to return array [closed]
/// <summary>
/// Returns an array of all ArtworkData filtered by User ID
/// </summary>
/// <param name="UsersID">User ID to filter on</param>
/// <returns></returns&...
1
vote
1
answer
13k
views
How to find textbox in GridView using javascript function fired on “Onclientsideselectedindexchanged” of a radcombobox in same GridView RSS
I have two controls a TextBox and a radcombobox in ItemTemplate of a GridView. What I want to do is when the event onclientsideselectedindexchanges of radcombobox is fired. I want to show/Hide the ...
1
vote
3
answers
110
views
`Conflicting assets with the same target path` with `bootstrap-table`
I've updated my developer tools in Windows 11 to use the updated .NET 9/10 of November 2025 update. I have not updated my projects to .NET 10, so the projects are running in .NET 9. I have one ...
3
votes
3
answers
4k
views
Replacing the connection string in the Web.config during Azure pipeline release
I have an old .NET project. I created an Azure Devops pipeline for it, a build and a deployment pipeline and I'll deploy it in 2 different environments.
I store some secret in Azure Keyvault, and the ...
0
votes
2
answers
10k
views
Keep file name in FileUpload control after postBack
I have got problem with FileUpload control. I have this one, two drop down list, text box and button. If I select in first dropDownList "Yes" second one become disable and set value on NO (In second ...
0
votes
2
answers
12k
views
Converting Data from memory stream to Data table
I am trying to fetch a data from an excel file url on a sharepoint site and put it in a data datatable but getting this error:
The input stream is not a valid binary format. The starting contents (in ...
15
votes
4
answers
23k
views
Differences between audience, issuer, and client terms in JWT, OAuth and OIDC
"It is half of the knowledge to say 'I don't know', when you don't"
proverb
I try to keep my knowledge about these terms clear and correct all the time. However, over the course of ...
0
votes
2
answers
10k
views
Posting XML to Web service in .NET C# and recieving response
I am posting XML file to Web services using C# , but I am getting error when I am requesting the response 'Server Error - 500 - You are not allowed to access the system . Any help will be appreciated. ...
55
votes
4
answers
41k
views
What is the difference between UseHttpsRedirection and UseHsts
I don't quite get the difference between UseHsts and UseHttpsRedirection in the configure section of the startup file in .net core. Could anyone explain?
2
votes
2
answers
9k
views
What are possible reasons for "Potentially dangerous Request.RawUrl"?
In an asp.net web forms application we get an error message with "A potentially dangerous Request.RawUrl" sometimes, but I cannot find the source of it.
What are the possible reasons for this ...
0
votes
1
answer
2k
views
How to download a PDF document from Google Docs and display it in the browser?
Using the code shown below, the PDF document seems not to be a valid PDF format. The browser displays the message, "Failed to load PDF document." If I save the download to a file and open it ...
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 ...
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 ...
1
vote
1
answer
143
views
Where do .resx (resource) files live in a dotnet application when one is using areas?
I'm working on a dotnet application that is using localization. I'm stuck on understanding where my .resx files are supposed to live.
The current file structure looks like this:
- Root
- Views
...
31
votes
4
answers
34k
views
ASP.NET how to Render a control to HTML?
I have any ASP.NET control. I want the HTML string how to do I get the HTML string of the control?
0
votes
3
answers
9k
views
Filtering gridview with textbox in header
Soo I'm trying to filter my gridview with textboxes in the header. I created a textchanged method for every textbox. Now I want to filter the gridview and bind the filtered data. For some reason the ...
1
vote
1
answer
29
views
Why request is being served before the request pipeline completes (or middleware function ends)?
I am developing a custom middleware for serving static content from wwwroot folder (I know there exists a predefined middleware for this).
But before termination of middleware's InvokeAsync method, ...
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 ...
129
votes
8
answers
187k
views
How can I get the baseurl of my site in ASP.NET Core?
Say my website is hosted in the mywebsite folder of www.example.com and I visit https://www.example.com/mywebsite/home/about.
How do I get the base url part in an MVC controller? The part that I am ...