Microsoft Q&A

.NET

20,698 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,698 questions with .NET-related tags

Sort by: Updated
0 answers

LINQ and VB 2015 : Select Distinct in Sub-List of Objects...

Hi, this is a simple example about my task. I have a List of Objects, let's say a group of Persons and each Person has a Property which is a List of other type of Objects, let's say Colors. I'd like to get a Distinct List of all Colors kept by all…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,060 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,314 questions
asked 2023-09-28T15:16:16.5533333+00:00
Marco Gregori 41 Reputation points
0 answers

Multiple types of Distributed Cache in ASP.NET Core

I would like to use Redis and In-Memory for IDistributedCache dependency injection. Is this possible? If so, how would you go about configuring this in Startup.cs?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 questions
asked 2023-09-28T05:21:08.6233333+00:00
John Russel Punio 0 Reputation points
commented 2023-09-28T15:15:33.91+00:00
John Russel Punio 0 Reputation points
0 answers

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,110 questions
asked 2023-09-28T14:59:18.6+00:00
Haviv Elbsz 1,226 Reputation points
1 answer

issue in opacity of the parent form and panel

Hi , my other problem is there is a scenario in which i have a form named child which is opened inside a panel of a form named father . what i am trying is when i press F2 on my keyboard a new form opens asking for current date . at this moment i want…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,631 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,995 questions
asked 2023-09-23T11:43:45.1433333+00:00
Shaifali jain 220 Reputation points
edited a comment 2023-09-28T14:45:28.3633333+00:00
KOZ6.0 560 Reputation points
2 answers

System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.Xml.XmlException: Root element is missing.

Hi, Everybody!... I am trying to parse the following XML…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,060 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,639 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,995 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
1,044 questions
asked 2023-09-27T22:41:28.2466667+00:00
Julio Bello 201 Reputation points
commented 2023-09-28T14:28:56.64+00:00
Julio Bello 201 Reputation points
0 answers

Azure Cognitive Search - Spell Checker Implementation in C#

I am looking for implementing spell checker for the azure cognitive search in C#. For now I have reviewed the spell checker link from the official Microsoft documentation: https://learn.microsoft.com/en-us/azure/search/speller-how-to-add But there's no…

Azure Cognitive Search
Azure Cognitive Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
401 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 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,995 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
1,686 questions
asked 2023-09-28T14:28:44.4133333+00:00
sachin sipl 0 Reputation points
0 answers

Custom Filters (CustomAuthenticationAttribute) in MVC CORE

I created custom filter in MVC5, please suggest if there is some equivalent in MVC…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 questions
asked 2023-09-28T14:22:16.5666667+00:00
Dotnet Engineer 320 Reputation points
1 answer One of the answers was accepted by the question author.

JWT Bearer Authentication Load to API fails

I created API with JWT Token , I know I need to pass credentials but just for test purposes I used get method instead of post. https://github.com/KalyanAllam/VisitsApi Where Auth Controller generates the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 questions
asked 2023-09-27T05:57:10.0133333+00:00
Dotnet Engineer 320 Reputation points
accepted 2023-09-28T14:16:05.8333333+00:00
Dotnet Engineer 320 Reputation points
0 answers

Error while trying to debug Xamarin app iPhone. MT1007: Failed to launch the application:Invalid Service Error

I am trying to debug my xamarin.iOS application in my iPhone. Visual studio 2022 17.7.4 Xamarin iOS : 16.4.0.15 xCode : 13.3.1 mac OS: Monterey 12.6.7 iPhone version (where the app is to be debugged) : iphone 12, 16.6.1 error MT1007: Failed to launch…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,160 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
839 questions
asked 2023-09-28T10:30:26.01+00:00
Gith 0 Reputation points
edited a comment 2023-09-28T14:08:46.7633333+00:00
Tianyu Sun-MSFT 20,686 Reputation points Microsoft Vendor
0 answers

dotnet monitor to prometheus metrics

I get no results from the /metrics url. How can I get metrics to work?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,060 questions
asked 2023-09-28T13:35:04.3133333+00:00
Boaz Davidoff 0 Reputation points
2 answers One of the answers was accepted by the question author.

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…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,631 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 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,995 questions
asked 2023-09-23T00:46:59.4233333+00:00
Ed Januskis 66 Reputation points
commented 2023-09-28T13:22:39.97+00:00
Ed Januskis 66 Reputation points
0 answers

ArgumentNullException on add-migration com.

Hello, I'm still on my app dev which is a Blazor Wasm with it's API (developped with .Net core 7.0) and I try to create an EF Core migration, but I've got an issue. N.B.: I use environment variables to set my connection string (to change it…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
587 questions
asked 2023-09-28T13:07:03.4866667+00:00
Laurent Guigon 221 Reputation points
0 answers

Environment Variable : ArgumentException: Format of the initialization string does not conform to specification starting at index 0

Hello Houston, I've got a problem! I read somewhere that we can utilize an environment variable to configure the connection string, and we can provide new values in CI/CD pipelines. Consequently, I modified my appsettings.json file to rely on an…

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,110 questions
asked 2023-08-26T17:47:42.6833333+00:00
Laurent Guigon 221 Reputation points
commented 2023-09-28T12:51:58.96+00:00
Laurent Guigon 221 Reputation points
0 answers

Image inside a DataGrid in a FixedDocument Error

I have created this small demonstration project to highlight a problem I have encountered when working with an Image within a DataGrid created in C# and then utilised within a FixedDocument.…

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,480 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,995 questions
asked 2023-09-28T12:40:04.9533333+00:00
BigH61 501 Reputation points
3 answers

Seed Data without entity (join table)

Hello, I've this configuration in my DBContext class : modelBuilder.Entity<Topic>() .HasMany(t => t.Keywords) .WithMany(k => k.Topics) .UsingEntity(j =>…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
587 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,995 questions
asked 2023-09-02T12:44:51.36+00:00
Laurent Guigon 221 Reputation points
edited an answer 2023-09-28T12:37:01.9833333+00:00
Laurent Guigon 221 Reputation points
0 answers

How to get all active session of the logged in user in .net core mvc

I'm currently working on a .net 7 mvc project. How can I get all the active sessions of a logged in user in .net core mvc. This is my setup currently: builder.Services.AddDistributedSqlServerCache(options =>     {         options.ConnectionString =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 questions
asked 2023-09-28T00:58:48.76+00:00
John Russel Punio 0 Reputation points
commented 2023-09-28T12:35:59.11+00:00
JasonPan - MSFT 2,691 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

Adorner Not showing

Hope you can help. I am continuing to try and learn WPF and my current test project (which I have simplified significantly to demonstrate my problem) is to display an Adorner on a window when a button is clicked to open a new Window. When this window is…

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,480 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,995 questions
asked 2023-09-15T09:50:57.5466667+00:00
BigH61 501 Reputation points
accepted 2023-09-28T12:33:57.4633333+00:00
BigH61 501 Reputation points
6 answers

Not remembering source control plug-in (Git)

Since the last release, Visual Studio 2022 is not remembering the source control selection. Every time a project is opened, I must open the options dialog, go to Source Control, and select Git from the "current source control plug-in." Once I…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,060 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,804 questions
asked 2023-09-06T18:51:27.7633333+00:00
Brad Knode 35 Reputation points
answered 2023-09-28T12:21:08.66+00:00
Robin Masters 0 Reputation points
0 answers

Visual Studio Community Version 17.7.4 Http Test 401 Errors

Since upgrading my Visual Studio Community edition to Version 17.7.4, I noticed that the method of sending requests in an http test document has changed in the UI from a green play button to a “Send Request” link. More importantly, since this update all…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,576 questions
asked 2023-09-27T14:23:59.85+00:00
John Reynolds 0 Reputation points
commented 2023-09-28T12:20:23.8466667+00:00
John Reynolds 0 Reputation points
1 answer

How do i add a chart to a window form?

I'm trying to create a real-time graph of variables I'm monitoring from a PLC. I want to use the chart in a vb windows form .net. I saw some examples online using the chart control. the chart control in visual studio 2022 is greyed out. I saw some notes…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,631 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,804 questions
Microsoft Graph Toolkit
Microsoft Graph Toolkit
A collection of reusable, framework-agnostic components and authentication providers for accessing and working with Microsoft Graph.
27 questions
asked 2022-03-07T20:11:57.793+00:00
Holdren, Drake 6 Reputation points
commented 2023-09-28T12:14:01.6333333+00:00
KOZ6.0 560 Reputation points