Content
ASP.NET Core: Unable to set focus on input element on view load
I am trying to set focus using javascript on the first unfocused input element of MVC view in a load window event listener. But element is focused only after page reloading. Attached browser - MS Edge I tried reloading the page programmatically using…
Azure AD: custom AudienceValidator function not firing
I'm testing locally. When the Audience in the bearer token is created like this: string[] scopes = { "https://graph.microsoft.com/.default" }; the user gets 401 unauthorized and my AudienceValidator function never fires. It fires when the…
Create a New Asp.Net Application Dialog Issue
I am unable to create an ASP.NET application on Net Framework 4.8.1 because the Create New Asp.Net Application Dialog does not show any option. I am using Microsoft Visual Studio Community 2022 (64-bit). Version 17.7.4 with Windows 11 Pro
Decimal price input is not a number
Good evening, I have started a new ASP.NET mvc project that works with EntityFramework. When I create a decimal Price (with Precision(18,2)) and generate a CRUD on it, the validation indicates that it is not a valid number with an input of 23,23. I…
Recommendation for Blazor Server use for an application
I would like to know if Blazor Server would be recommended as the way to go for an application that does the following Needs to run on any device able to run .NET apps (i.e. Raspberry PI etc.) Needs to access IOT devices (JSON strings received or sent…
How to secure API KEY in .net MAUI?
I am new to .Net MAUI but fairly experienced with ASP.NET CORE and Blazor. I'm developing a MAUI application that will allow a user to integrate with third-party services using API keys. My issue is, I'd like to store API Key securely and nobody can…
VS 2022 .net6 core C#. Application.StartupPath is different at run time.
Hi, I am trying to capture my project home directory: string exeFolder = Application.StartupPath; While i test app i am getting path with MyPath"bin\Debug\net6.0-windows". in result i cannot access my report folder with reports. Is there a…

Wavy underline of a text in the textbox using adorner.
//pathPen is used to draw line with square cap at start and end. Pen pathPen = new Pen(new SolidColorBrush(Colors.Red), 0.2); pathPen.EndLineCap = PenLineCap.Square; pathPen.StartLineCap = PenLineCap.Square; //pathGeometry is used to draw…

How to get the data from start date to end date
How can I find data from database between two dates. Problem-1. How can I find the data from the database between the two dates if I consider the parameters. Problem-1. If I use date as parameter then my datatable doesn't show data. Problem-2. I want to…

Continue to running the application in the background?
Hello, I need my app to run in the background as my app keeps track of a workout's total time once it starts, when the user completes a set in the exercise, it has a timer that countdowns their rest time, say 30 seconds or so, when that is completed it…
Transfer the WebApi application to another PC, test it, without a development environment?
Hello, @AgaveJoe https://learn.microsoft.com/en-us/iis/application-frameworks/scenario-build-an-aspnet-website-on-iis/configuring-step-1-install-iis-and-asp-net-modules The target machine needs a host like IIS to host Web API. We have no idea how your…
key for ticket in asp ticket store for login
I am doing app with login with ticket store. Problem is that I wish to obtain new key to be in cookie each time it is used. So I wish new key after each use. I tried to log out and log in controller to get new key but it fails to work. It gives me same…
ASP.NET CORE WEBAPI Custom Filter <> Bearer Token
Seeing this article [http://dotnet-concept.com/Tutorials/2020/1/5800875/Web-API-Tutorial-Csharp-Part-3-Implementing-basic-Bearer-authentication-in-Web-API-application] I created a custom filter CustomAuthenticationAttribute , I am trying use Custom…
system.drawing.icon from System.Windows.Shapes.Path
<Path x:Key="Icon.Path.ExpandAll" Style="{StaticResource Style.Path.Icon.Base}" StrokeThickness="0.2" Data="M19,19V5H5V19H19M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5C3,3.89 3.9,3…

String and integer needing to be added to exisiting categories.
Hi, I have a grocery list app that I have a browse for groceries on a catalogue and that catalogue adds it to a category with number of database functions and models. The categories are on the listViewModel page. What I am struggling with is being able…
How to set VisualStates in MAUI CollectionView in C# (NOT Xaml)
Hi, In reference to Microsoft MAUI Documentation, it is possible to change visual state of selected CollectionView items in Xaml:…
Pending Navigations still processing when navigating from page constructor or OnNavigated method in MAUI
I am using MAUI with .NET 7 and I want to implement login flow. Basic case I have is to have only 2 pages: Dashboard and Login. Third page is Loading page that will have no layout, just serves as a routing page. Flow is: Loading page is the first one…
Strategies for Handling Large File Uploads in a .NET Web API?
I am designing a .NET Web API that needs to handle large file uploads. I am exploring different strategies to efficiently process and store large files while ensuring the application remains responsive. Can anyone provide insights, recommendations, or…
How to Optimize Database Queries in a .NET Entity Framework Application?
I am developing a .NET application using Entity Framework for database interactions. I have noticed some performance bottlenecks related to database queries and am seeking advice on optimizing them. Can anyone share tips, best practices, or resources on…
How to Implement Efficient Logging in a .NET Core Application?
I am developing a .NET Core application and am exploring different approaches to implementing efficient and scalable logging mechanisms. I am considering using libraries like Serilog and NLog but am open to other recommendations. Can anyone provide…