Microsoft Q&A

.NET

20,615 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,615 questions with .NET-related tags

Sort by: Updated
0 answers

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…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,553 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
688 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
985 questions
asked 2023-09-24T21:57:19.01+00:00
Stanislav Panferov 45 Reputation points
edited the question 2023-09-24T22:35:11.6566667+00:00
Stanislav Panferov 45 Reputation points
2 answers

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…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,546 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
242 questions
asked 2023-09-24T21:19:38.4233333+00:00
JAL 546 Reputation points
answered 2023-09-24T22:13:47.18+00:00
Bruce (SqlWork.com) 44,076 Reputation points
0 answers

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

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,777 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
985 questions
asked 2023-09-24T19:37:39.7+00:00
AHSAN ALI 1 Reputation point
edited the question 2023-09-24T20:28:53.7166667+00:00
AHSAN ALI 1 Reputation point
1 answer

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…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
985 questions
asked 2023-09-24T17:42:33.1333333+00:00
Lyoon 0 Reputation points
answered 2023-09-24T19:48:21.4333333+00:00
Bruce (SqlWork.com) 44,076 Reputation points
1 answer

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…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,553 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,103 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
10,924 questions
asked 2023-09-23T22:07:05.4433333+00:00
Robert Salasidis 111 Reputation points
commented 2023-09-24T19:44:22.7466667+00:00
Bruce (SqlWork.com) 44,076 Reputation points
3 answers

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…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,843 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,964 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
242 questions
asked 2022-10-16T08:11:56.553+00:00
ASAD ALAM 1 Reputation point
answered 2023-09-24T19:33:47.28+00:00
Bruce (SqlWork.com) 44,076 Reputation points
2 answers

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…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,553 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,964 questions
asked 2023-09-23T00:46:59.4233333+00:00
Ed Januskis 46 Reputation points
commented 2023-09-24T18:51:42.62+00:00
Mavaddat Javid 16 Reputation points
0 answers

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…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,475 questions
asked 2020-08-05T05:24:19.513+00:00
Naveen kumar 1 Reputation point
commented 2023-09-24T18:25:18.88+00:00
Vahid Ghafarpour 6,015 Reputation points
1 answer

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…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,553 questions
asked 2023-09-24T17:33:46.7466667+00:00
jewel 461 Reputation points
answered 2023-09-24T18:02:02.1033333+00:00
Vahid Ghafarpour 6,015 Reputation points
0 answers

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…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,843 questions
asked 2023-09-24T17:48:06.5066667+00:00
Justin Sinnard 0 Reputation points
1 answer

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…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,632 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,964 questions
asked 2023-09-24T16:42:14.5033333+00:00
Markus Freitag 3,361 Reputation points
answered 2023-09-24T17:20:26.6233333+00:00
P a u l 9,011 Reputation points
0 answers

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
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,553 questions
asked 2023-09-24T17:17:09.4166667+00:00
jacek.sniadecki2022 0 Reputation points
3 answers

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…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,553 questions
asked 2023-09-23T04:54:58.3533333+00:00
Dotnet Engineer 240 Reputation points
commented 2023-09-24T16:57:07.3+00:00
Bruce (SqlWork.com) 44,076 Reputation points
1 answer

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…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,475 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,964 questions
asked 2023-09-23T23:38:51.9566667+00:00
essamce 621 Reputation points
answered 2023-09-24T14:51:03.83+00:00
Castorix31 77,191 Reputation points
1 answer One of the answers was accepted by the question author.

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…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,148 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,964 questions
asked 2023-09-24T10:24:24.9166667+00:00
Matthew Zoljan 80 Reputation points
accepted 2023-09-24T12:48:12.82+00:00
Matthew Zoljan 80 Reputation points
2 answers One of the answers was accepted by the question author.

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:…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,843 questions
asked 2023-02-19T11:19:00.91+00:00
Alex Kay 30 Reputation points
edited an answer 2023-09-24T12:28:41.2966667+00:00
axa88 0 Reputation points
0 answers

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…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,843 questions
asked 2023-09-24T09:50:19.78+00:00
Milos Ciprijanovic 0 Reputation points
2 answers One of the answers was accepted by the question author.

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…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,045 questions
asked 2023-09-23T14:37:03.9866667+00:00
William Goodfellow 0 Reputation points
accepted 2023-09-24T09:24:44.0333333+00:00
William Goodfellow 0 Reputation points
1 answer One of the answers was accepted by the question author.

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…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,045 questions
asked 2023-09-23T14:36:34.5433333+00:00
William Goodfellow 0 Reputation points
accepted 2023-09-24T09:24:23.3433333+00:00
William Goodfellow 0 Reputation points
1 answer One of the answers was accepted by the question author.

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…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,045 questions
asked 2023-09-23T14:35:43.63+00:00
William Goodfellow 0 Reputation points
accepted 2023-09-24T09:23:13.1366667+00:00
William Goodfellow 0 Reputation points