Microsoft Q&A

.NET

15,331 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

15,331 questions with .NET-related tags

Sort by: Updated
0 answers

No forms appearing in custom template VS 2022 Mac or PC

I have been looking over the material for the new templating engine, https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-item-template and https://github.com/dotnet/templating/tree/main, and have created a .template.json file…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,165 questions
asked 2023-06-02T18:42:29.7566667+00:00
Gregory Lange 0 Reputation points
edited a comment 2023-06-06T13:22:07.51+00:00
Gregory Lange 0 Reputation points
2 answers One of the answers was accepted by the question author.

How to bind asp-items to the model in a select element appended by js dynamically?

$("#List").append("<tr>" + "<td> <select name='dm' asp-items='"+Model.dmdata+"'>" + "</select></td>" …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,161 questions
asked 2023-06-04T01:20:40.3366667+00:00
Alick Wang 141 Reputation points
answered 2023-06-06T13:21:41.0966667+00:00
Ola Alsafady 0 Reputation points
2 answers

Taking too much time to Load all files from the folder in ASP.NET Web page.

I am loading the files from the server folder in a web page. But, the head ache is, it's taking too much time to load all the files from the specific folder. Hardly it will be taking 30 to 45 mins to load all the files. End user can't wait till load all…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,486 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
555 questions
asked 2023-05-22T12:32:03.3233333+00:00
Gani_tpt 1,321 Reputation points
commented 2023-06-06T13:19:36.9+00:00
Gani_tpt 1,321 Reputation points
0 answers

How to change the popup screen background color?

Background color i need to change to Black.... In the above example it is white i need to set to black I am using CommunityToolkit.Maui for popup

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,429 questions
asked 2023-06-06T10:11:04.42+00:00
Sowndarrajan Vijayaragavan 80 Reputation points
commented 2023-06-06T13:00:31.2233333+00:00
Sowndarrajan Vijayaragavan 80 Reputation points
0 answers

can not connect signalr in android 7

android 7 can not connect to signalr hub there is an error:

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,161 questions
asked 2023-06-06T12:06:57.0266667+00:00
mc 1,961 Reputation points
edited a comment 2023-06-06T12:46:46.55+00:00
AgaveJoe 22,706 Reputation points
0 answers

how to write nsi script for a windows application custom URL schema setup

I want to add a new registry for my Windows application while installing so for that I need to add the registry in the nsi script so can anyone suggest to me how to write that in nsi script, Thanks in advance.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,898 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,165 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,209 questions
asked 2023-06-06T12:21:04.2733333+00:00
Dineshkumar.S 346 Reputation points
2 answers One of the answers was accepted by the question author.

Why can't Entity Framework handle cascade deletes on a maybe child

I don't know if this is a SQL Server issue or an Entity Framework issue. In addition, I am reticent to say "bug" as Microsoft tests so well, but this strikes me as a potential bug (or feature limitation). This is for a political campaign…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,820 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
asked 2023-06-05T23:36:18.4366667+00:00
David Thielen 966 Reputation points
commented 2023-06-06T12:19:33.87+00:00
David Thielen 966 Reputation points
1 answer

Why is Select().Contains() ok while Any() is not?

Hi all; I first tried the following code: var statesIndirectDelete = await States .Where(s => deletedCountries.Any(c => c.Id == s.CountryId)) .ToListAsync(); and that gave me the error: System.InvalidOperationException The LINQ expression…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
asked 2023-06-05T03:30:01.6166667+00:00
David Thielen 966 Reputation points
commented 2023-06-06T11:59:25.75+00:00
David Thielen 966 Reputation points
1 answer

How do I use a regular expression in Entity Framework?

For the method: public static IQueryable<ClaimIdentityUser> FindClaimsRegExAsync(this UserDbContext dbContext, string searchEmail, string searchClaimValue) { // if both search terms are empty, return all claims if…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
asked 2023-06-06T00:00:20.3766667+00:00
David Thielen 966 Reputation points
answered 2023-06-06T11:50:00.1033333+00:00
David Thielen 966 Reputation points
1 answer

Entity Framework - is AnyAsync() the most efficient approach? Or is Contains() better?

Hi all; My situation is I have 4 different model objects that each have a property: public string UniqueId { get; private set; } This UniqueId must be unique across all 4 tables (sort of a super unique key). First, I do set it to be unique in each model…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
asked 2023-06-05T20:36:09.82+00:00
David Thielen 966 Reputation points
commented 2023-06-06T11:48:31.5966667+00:00
David Thielen 966 Reputation points
1 answer One of the answers was accepted by the question author.

Delete a record with the primary key

Hi; Is there a way to delete a record by its primary key? Yes I know I can do the following: using (var context = new MyDbContext()) { var entity = context.MyEntity.Find(id); context.MyEntity.Remove(entity); context.SaveChanges(); } But I…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
asked 2023-06-05T20:32:22.7166667+00:00
David Thielen 966 Reputation points
commented 2023-06-06T11:44:17.9833333+00:00
David Thielen 966 Reputation points
1 answer One of the answers was accepted by the question author.

What is the best way to see what my EF requests turn into

Hi all; What is the best way to see clearly/quickly/easily what an EF query becomes. Both the SQL sent to the DB and any subsequent LINQ operations? At present I run in the debugger and stop on the line after the query. I then look at the log output and…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
asked 2023-06-05T20:29:02.0633333+00:00
David Thielen 966 Reputation points
commented 2023-06-06T11:40:47.58+00:00
David Thielen 966 Reputation points
1 answer

If we delete WitnessClientAdmin.log from the event logs, what activities are deleted?

Hello World, I've seen an event ID of 104 from the system, which states that The WitnessClientAdmin log was cleared. I've looked in other resources but haven't been able to find out more about it, therefore I'm curious as to what other actions or…

Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,265 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
9,505 questions
F#
F#
A strongly typed, multi-paradigm programming language developed by the F# Software Foundation, Microsoft, and open contributors.
18 questions
.NET F#
.NET F#
.NET: Microsoft Technologies based on the .NET software framework.F#: A strongly typed, multi-paradigm programming language developed by the F# Software Foundation, Microsoft, and open contributors.
48 questions
asked 2023-06-05T12:40:53.01+00:00
AJ7 0 Reputation points
edited a comment 2023-06-06T10:53:35.3433333+00:00
AJ7 0 Reputation points
2 answers

how to execute task in a certain time?

If I want to execute something in a certain time how to do it? except timer? If I want to update the queue at 09:56 how to do it?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,161 questions
asked 2023-06-06T00:33:28.79+00:00
mc 1,961 Reputation points
answered 2023-06-06T10:49:28.1166667+00:00
AgaveJoe 22,706 Reputation points
0 answers

How can I exclude transitive dependencies that are not needed in the project when publishing my application?

Hi there, I'm building my first real c#.net app using Windows Forms and I used ChatGPT a lot for this as I'm only using Visual Studio Code and have no good way to kickstart my project in any other way. This all worked fine and I came to a point where I…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,473 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,165 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,209 questions
asked 2023-06-05T08:51:34.61+00:00
Schmidlin Tizian 0 Reputation points
commented 2023-06-06T10:44:38.4833333+00:00
Schmidlin Tizian 0 Reputation points
0 answers

Net maui runtime loading problem ?

I have created languageconverter as above binding from C# listing...Firstly binding values by Text="{DynamicResource Key=welcome}" like that.. it is working as expected but when loaded page with custom collectionview is not changing language…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,429 questions
asked 2023-06-02T16:18:57.21+00:00
Sami 281 Reputation points
commented 2023-06-06T10:17:39.5+00:00
Sami 281 Reputation points
0 answers

HTTP-500 error when connecting from FrontDoor with AAD authentication on Blazor Server

I created a Blazor Server app that uses the AAD authentication, referring to the following URL. https://learn.microsoft.com/en-us/azure/active-directory/develop/tutorial-blazor-server Then I deployed to AppService and this worked fine. After that, I…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,782 questions
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
389 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.
982 questions
asked 2023-06-06T10:13:37.4433333+00:00
38997385 20 Reputation points
0 answers

Different dialog opening position behavior when starting application from Explorer vs. Command Line/VS/...

Hello, we have noticed a problematic difference in the automatic positioning of modal dialogs in our Windows application when using multiple monitors: When our application was started from cmd.exe, PowerShell or a different application (like Visual…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,165 questions
asked 2023-06-06T07:41:23.4666667+00:00
Sebastian Fischer 0 Reputation points
commented 2023-06-06T09:53:52.55+00:00
Hui Liu-MSFT 17,456 Reputation points Microsoft Vendor
1 answer

How to change the UI when the model's view property changes?

Hi all. Recently I started to study the mvvm pattern and ran into a problem. How to change the UI when the model's view property changes? There is a model public class Setting { public string AliasCertificate { get; set; } =…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,165 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,429 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,209 questions
asked 2023-06-01T08:55:34.15+00:00
Влад Тигинян 0 Reputation points
commented 2023-06-06T09:52:03.3533333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 20,446 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How to check if the record exist with same value in the database before insert

Hi, In my Blazor Server application, I am inserting a list of data into a database as follows; public async Task AddStockAsync(List<GameBank> gameBank) { await _oyunPalasContext.GameBanks.AddRangeAsync(gameBank); await…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
521 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,161 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.
982 questions
asked 2023-06-03T11:32:44.3633333+00:00
Cenk 886 Reputation points
edited a comment 2023-06-06T09:45:57.34+00:00
Karen Payne MVP 31,001 Reputation points