Microsoft Q&A

.NET

20,717 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,717 questions with .NET-related tags

Sort by: Updated
0 answers

Blazor accessing global variable issue

Hi all I asked here how to save variable state and i get long answers and what I want is to know if it's possible in blazor to define a variable somewhere in the app structure so I can access it from any component. something like in console program…

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,111 questions
asked 2023-10-01T07:18:17.1633333+00:00
Haviv Elbsz 1,251 Reputation points
0 answers

Maui- app.cs write in constructor http call

Hi, I need to write http call asynchronously and i have only constructor their. Is not allowed to make asynchronous call in constructor? Thanks,

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,873 questions
asked 2023-10-01T06:25:22.0666667+00:00
דני שטרית 1,221 Reputation points
0 answers

Maui - Order of launch

Hi, What order of steps that Maui launch ? Maui program.cs. app.xaml...... Thanks,

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,873 questions
asked 2023-10-01T06:21:36.58+00:00
דני שטרית 1,221 Reputation points
6 answers

Unable to run .net 4.8 apps on IIS using Arm processor (M1 Max)

I have a macbook pro with M1 max processor running windows 11 pro in Parallels using the most updated version as to writing this message. When trying to run .net 4.8 app on IIS I get the following error in the event viewer: The Module DLL 'C:\Program…

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,639 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
988 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
6,024 questions
asked 2023-02-23T14:34:02.8166667+00:00
Bodokh 5 Reputation points
answered 2023-10-01T05:46:50.15+00:00
A. Carlos Pinheiro 0 Reputation points
2 answers One of the answers was accepted by the question author.

Blazor default template application issue

Hi all. in the default template application of blazor when clicking the button the count variable is increasing by 1. but when navigate to other component and then return to the Counter component the count value is reset to 0 what changes I need to do in…

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,111 questions
asked 2023-09-28T14:59:18.6+00:00
Haviv Elbsz 1,251 Reputation points
accepted 2023-10-01T05:41:30.7333333+00:00
Haviv Elbsz 1,251 Reputation points
1 answer

EF Core: Map multiple c# classes to DB table

Hello, I have a DB table named JobPosting with 60 columns. I'd like to have 2 c# entities JobPostingFull & JobPostingLite which both reference the JobPosting table. The JobPostingFull class has all columns from the DB, the JobPostingLite class has…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
588 questions
asked 2023-09-30T14:36:07.7+00:00
Satish Cherian 0 Reputation points
answered 2023-10-01T04:35:59.8166667+00:00
AgaveJoe 680 Reputation points
3 answers

Working on a tutorial and cannot find the Web Site Administration Tool.

Hello, I am working on a login tutorial and cannot find the Web Site Administration Tool to use to configure asp.net. Here is a link to the tutorial: https://learn.microsoft.com/en-us/previous-versions/aspnet/yh26yfzy(v=vs.100) I vaguely…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,639 questions
asked 2022-06-29T01:41:15.137+00:00
AlphaCr8tive 1 Reputation point
commented 2023-10-01T02:17:11.5533333+00:00
Albert Kallal 4,216 Reputation points
3 answers One of the answers was accepted by the question author.

How To create a framework

How to create the framework in C# with Example

Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
259 questions
asked 2023-08-10T12:35:48.8366667+00:00
Siddangoud Bharamagoudar 61 Reputation points
edited an answer 2023-09-30T21:17:09.27+00:00
Andreo 0 Reputation points
1 answer

Azure AD authentication claims returns null in Dotnet core 6.0

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,430 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,656 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 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.
9,015 questions
asked 2023-09-30T14:11:23.1266667+00:00
Mansi Sulodia 1 Reputation point
edited an answer 2023-09-30T20:32:19.9233333+00:00
Bruce (SqlWork.com) 44,631 Reputation points
2 answers One of the answers was accepted by the question author.

Logging in C# - To a text file

I am creating a console application and I understand that I need to use ILoggerFactory for logging purpose, but how can I get it to be written to a text file instead to the debug section or the console window.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,065 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.
9,015 questions
asked 2023-09-29T07:13:11+00:00
Kalpana 266 Reputation points
commented 2023-09-30T15:05:28.9933333+00:00
Kalpana 266 Reputation points
0 answers

Get null values in claims in azure ad authentication using DotNet core 6.0 Web Api

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,656 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,065 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 questions
asked 2023-09-30T13:45:48.4133333+00:00
Mansi Sulodia 1 Reputation point
0 answers

docker compose didn't work with SSL for devcert

i have an issue to setup local environment to run docker compose to publish api services that using .net 7 docker-compose.debug.yml is version: '3.4' services: webapp: image: mcr.microsoft.com/dotnet/samples:aspnetapp ports: - 80 …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 questions
asked 2023-09-30T10:22:52.8933333+00:00
le quach 0 Reputation points
0 answers

MAUI extensions not available on visual studio 2022

I have Visual Studio v 17.7.4 and Visual Studio Preview v 17.8.0 and have recently installed the MAUI suite.  I am not given the option to create multi-platform apps as I assume I would on VS or VSP. I have gone through previous iterations of the…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,815 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,873 questions
asked 2023-09-17T23:15:46.5933333+00:00
Reabetswe Marumane Mogoswane 0 Reputation points
commented 2023-09-30T08:37:12.5333333+00:00
Reabetswe Marumane Mogoswane 0 Reputation points
1 answer One of the answers was accepted by the question author.

how can pass input type text value one cshtml view to another cshtml view usi

In my project I want to use a datatable in two ways. The data will be inserted with the data from index.cshtml. The page will then redirect to the purchaseDetails.cshtml page. Then the data that will be displayed is based on the invoice number of the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 questions
asked 2023-09-29T15:56:34.7+00:00
jewel 501 Reputation points
accepted 2023-09-30T07:12:56.7333333+00:00
jewel 501 Reputation points
1 answer

Display Map in MVC CORE

I am displaying location from web browser I want to embed map here and pass latitude and longitude…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 questions
asked 2023-09-29T10:39:04.0466667+00:00
Dotnet Engineer 365 Reputation points
answered 2023-09-30T06:35:14.6866667+00:00
Dotnet Engineer 365 Reputation points
0 answers

Getting Data in a List using four different tables

I have the following database tables Employee table -Database name Employee - EmployeeID is the primary key JobTitleID EmployeeNumber SectionID EmployeeId 9 1234 2 1 2 8976 3 …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 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.
9,015 questions
asked 2023-09-30T05:58:29.78+00:00
Anjali Agarwal 1,041 Reputation points
1 answer

Customtextbox in customdatagridview

Hi , i have a Created a textbox which when gets the focus , changes its backcolor and forecolor . It also clear out its text when the user presses escape key . Moreover, it also have a custom caret in it which looks like Dos . Is it possible to create a…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,636 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.
9,015 questions
asked 2023-09-29T12:07:32.6766667+00:00
ankit goel 586 Reputation points
edited a comment 2023-09-30T03:55:13.4733333+00:00
KOZ6.0 955 Reputation points
2 answers

How to register Microsoft.ACE.OLEDB.12.0 provider on my machine?

I have a 64-bit version of Microsoft Windows 11. Whenever I try to run my apps, the error registers Microsoft.ACE.OLEDB.12.0 provider is not registered on my machine. I need that provider to run my apps that include a Data Grid View control. Are there…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,065 questions
asked 2023-09-29T01:25:21.3766667+00:00
John 366 Reputation points
commented 2023-09-30T00:04:03.89+00:00
John 366 Reputation points
1 answer

Store a Value in application

Hi , Can the experts here suggest me a way how to store a value of a label from a particular form in such a way that can be made safe until next restart of a application and can be retrieved next time for use .

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,636 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.
9,015 questions
asked 2023-09-29T10:34:56.03+00:00
Shaifali jain 300 Reputation points
answered 2023-09-29T20:18:41.67+00:00
Karen Payne MVP 32,991 Reputation points
1 answer

MAUI: Listview isvisible property is not working from the code behind?

I am trying to show the selected image or file on my UI on a listview. So initially the listview's IsVisible I set to false and after picking item I set the IsVisible property to true. My problem is after picking item the listview is not visible on the…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,873 questions
asked 2023-09-19T14:24:15.5166667+00:00
Sreejith Sreenivasan 406 Reputation points
commented 2023-09-29T19:08:15.4933333+00:00
Rob Caplan - MSFT 5,222 Reputation points Microsoft Employee