Microsoft Q&A

.NET

14,034 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

14,034 questions with .NET-related tags

Sort by: Updated
0 answers

Programatically force winform app to open at 125 scaling using Dotnet core 6

We have built a DPI Unaware Winform app using DotNet core 6 which works fine on windows operating system with 100% and 125% scaling options on all devices whether it's laptop or desktop . Example screenshot for the 125 scaling is given below The moment…

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.
7,571 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
886 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,401 questions
asked 2023-03-27T12:17:02.6366667+00:00
Sunny Sharma 1 Reputation point
commented 2023-03-28T08:43:29.8133333+00:00
Sunny Sharma 1 Reputation point
0 answers

Mail functionality breaks in Azure Web Apps

Hello! I have recently started working on an ASP.NET Core application that is to be deployed as an Azure Web App. As part of the App, we need some sort of mailing functionality in order to notify customers upon purchases. However, every part of…

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.
7,571 questions
Azure App Services
Azure App Services
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,568 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,835 questions
asked 2023-03-28T07:55:33.6666667+00:00
Jareen 0 Reputation points
edited the question 2023-03-28T08:41:02.7933333+00:00
Lan Huang-MSFT 11,821 Reputation points Microsoft Vendor
2 answers

How to support multiple names for a property using System.Text.Json Deserialization?

Hello together, right now I'm reading following learn article: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/custom-contracts It is written Support multiple names for a single property (for example, if a previous…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
886 questions
asked 2023-03-27T01:08:56.12+00:00
PFJ 0 Reputation points
commented 2023-03-28T08:38:41.17+00:00
Jack J Jun 21,976 Reputation points Microsoft Vendor
1 answer

Does Maui-Android have an issue with Shadow property for the Border control?

When I define Shadow for the Border control (see XAML code below), Android fails to display. It works fine on WinUI. If I remove Shadow definition in XAML it works for Android. Does Android have an issue with Shadow? <Border Stroke="Blue"…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 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.
7,571 questions
asked 2023-03-27T18:27:32.8933333+00:00
dg2k 916 Reputation points
edited the question 2023-03-28T08:33:10.68+00:00
dg2k 916 Reputation points
2 answers One of the answers was accepted by the question author.

How to run PowerShell with admin right

Hi, I need to run PowerShell with admin rights to get permission to run a script in C# code. If there is a solution please leave a comment, many thanks.

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.
7,571 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
886 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
392 questions
asked 2023-03-27T04:15:40.04+00:00
365 timviec 0 Reputation points
commented 2023-03-28T08:29:41.02+00:00
365 timviec 0 Reputation points
1 answer One of the answers was accepted by the question author.

Samples for Xamarin.iOS projects should be upgraded to .NET SDK-style projects in Xamarin Support Policy

I developed a cross-platform applications with Xamarin.iOS.framework and Xamarin.Mac.framework and Mono.framework. I found some anxious information in https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin. I want to know what's the quickest…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 questions
asked 2023-03-20T02:48:22.8133333+00:00
Sun, Tracy (LNG-SHA) 20 Reputation points
commented 2023-03-28T08:04:12.56+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,441 Reputation points Microsoft Vendor
0 answers

Circular Progressbar through SKIA Sharp is not working in MAUI

I have created a custom control for circular progress bar using skia sharp in xamarin forms and it is not working in MAUI after migration. I have shared the code below, please check <skia:SKCanvasView x:Name="canvas" …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 questions
asked 2023-03-27T11:27:08.9133333+00:00
Satya 40 Reputation points
commented 2023-03-28T07:57:26.0966667+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,441 Reputation points Microsoft Vendor
0 answers

How to Open Files on Xamarin Android Using FilePicker

using Xamarin.Essentials; (at the top of the file) async Task<FileResult> PickAndShow(PickOptions options) { try { var result = await FilePicker.PickAsync(options); if (result != null) { string Text…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,926 questions
asked 2023-03-21T13:53:33.71+00:00
Ronald GANS 136 Reputation points
commented 2023-03-28T07:50:41.9633333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,736 Reputation points Microsoft Vendor
1 answer

How to restrict scrolling and panning with single finger and enable with two fingers in UWP ScrollViewer using touch screen?

Hi, In an UWP application, I am having a ScrollViewer in the XAML which contains a StackPanel as Content. In that StackPanel there are some images. XAML: <Grid> <ScrollViewer x:Name="scrollView"…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,926 questions
Universal Windows Platform (UWP)
asked 2023-03-27T06:02:13.86+00:00
Imman Kumar 6 Reputation points
answered 2023-03-28T07:47:45.71+00:00
Roy Li - MSFT 28,061 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

CommunityToolkit.Maui.Storage.FileSaver on iOS strange

I have the latest release version of CommunityToolkit.Maui (5.0.0). When I run CommunityToolkit.Maui.Storage.FileSaver in my app on iOS I get a strange user interaction. The window shown looks like that in the iOS_FileSaver.png image attached. The…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 questions
asked 2023-03-26T16:35:16.08+00:00
Eigil Krogh Sorensen 61 Reputation points
accepted 2023-03-28T07:44:52.4966667+00:00
Eigil Krogh Sorensen 61 Reputation points
0 answers

How to improve the MAUI Button responsiveness in a "this.Dispatcher.Dispatch" thread?

I have a MAUI application with two "this.Dispatcher.Dispatch"ed NavigationPages launched from the App class, both of which have two ImageButtons both of which have extremely poor responsiveness as compared to the buttons of other…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 questions
asked 2023-03-28T01:33:23.4733333+00:00
Marc George 66 Reputation points
commented 2023-03-28T07:41:31.45+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 44,086 Reputation points Microsoft Vendor
3 answers

saving png image to the database

I am trying to save a .png image to the database. I have a field in database called sign with type varbinary(max) and I have following in the Model: public partial class EmployeeInfo { public int EmployeeInfoId { get; set; } public byte[]? Sign { get;…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,835 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.
7,571 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
736 questions
asked 2023-03-24T01:13:31.4566667+00:00
Anjali Agarwal 636 Reputation points
answered 2023-03-28T07:33:12.42+00:00
Karen Payne MVP 30,216 Reputation points
0 answers

How to read the large data from serial port in visual c++/cli

i am trying to read the large file from serial port expected output 112 212 311 411 but i get new line between some data like output 112 212 /n 311 /n 411 I got some extra new line .how to solve it private: System::Void…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,835 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,755 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
5,943 questions
asked 2023-03-28T07:27:53.0066667+00:00
denesh neupane 121 Reputation points
edited the question 2023-03-28T07:29:27.62+00:00
denesh neupane 121 Reputation points
6 answers

Does MAUI support push notification

Does MAUI preview 6 have option to support or handle push notifications using FCM.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 questions
asked 2022-08-04T08:30:59.637+00:00
Anjana Jois 1 Reputation point
commented 2023-03-28T07:10:51.1633333+00:00
Evasco, Jerome Marvin 6 Reputation points
2 answers

Printing a div card with exact styles as it appears on the web page

On my web form, I have these div card where there are labels with values, and two image controls. The labels on the card can have their font-family and color changed by the user o the client side to the desire of the user, using controls provided to do…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
886 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.
462 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,323 questions
asked 2023-03-25T13:15:41.9733333+00:00
Donald Symmons 1,266 Reputation points
commented 2023-03-28T07:01:06.2466667+00:00
Donald Symmons 1,266 Reputation points
1 answer

c# EF 6 how to make this better ?

Hello all, I need to find a solution for to have better performance on a method. As you can see in the picture i have a method who is call on a MVC Controller. This method will be call too much in more or less one hour. This method FindEvents, take a…

Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
230 questions
asked 2023-03-28T06:55:15.0933333+00:00
cristopheB 501 Reputation points
answered 2023-03-28T07:00:52.56+00:00
Sedat SALMAN 570 Reputation points
2 answers

Change font in MAUI Blazor?

I have downloaded the font Comfortaa and saved it in the directory wwwroot/css/open-iconic/font/. In the file index.html I loaded the font under <style>: I also specified the alternative font "courier new". As you can see, it seems…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,084 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.
884 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.
7,571 questions
asked 2023-03-27T19:09:16.13+00:00
perfect code 271 Reputation points
edited an answer 2023-03-28T06:59:01.6166667+00:00
perfect code 271 Reputation points
3 answers

How to run windows task schedular using Service Account

I am developing many tools using .NET EXE and SSIS packages. My question is, I want to run all the scheduler (EXE and SSIS Packages) using service account. I have two accounts. One is "Admin" Account. Two is "Service" Account. Admin…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
886 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
1,956 questions
asked 2023-03-21T12:55:44.82+00:00
Gani_tpt 1,241 Reputation points
commented 2023-03-28T06:49:34.8066667+00:00
ZoeHui-MSFT 20,101 Reputation points
2 answers

How to bind table data dynamically to pdfmake table body using jquery

I have created a HTML Table and I want to download selected columns into pdf using pdfmake below is my code example html code :- <div id="tablediv"> <table id="stockalloctbl_1"> <thead> <tr…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,323 questions
asked 2023-03-27T10:52:54.96+00:00
Ashok Kumar 121 Reputation points
answered 2023-03-28T06:49:00.5466667+00:00
Lan Huang-MSFT 11,821 Reputation points Microsoft Vendor
1 answer

Correlation failed, cookies not found using OpenID in ASP.net core MVC 6

I am getting the below error in my ASP.net core MVC 6 application, my application is using Keycloak and is running in a docker container. We connect to Keycloak using OpenID, but after logging in Keycloak this error occur warn:…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,835 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
736 questions
asked 2023-03-19T12:09:20.3466667+00:00
cebuhax0r 21 Reputation points
answered 2023-03-28T06:46:46.85+00:00
Yahya SÖNMEZ 0 Reputation points