Microsoft Q&A

.NET

20,553 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,553 questions with .NET-related tags

Sort by: Updated
1 answer

How to validate XML dataset when hexadecimal invalid character arrives

I am processing some xml document. while reading xml value through dataset, I am getting below error. System.Xml.XmlException: ''', hexadecimal value 0x02, is an invalid character. Line 1, position 989.' How to avoid this...? How to validate and…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,017 questions
asked 2023-09-21T09:49:42.04+00:00
Gani_tpt 1,401 Reputation points
answered 2023-09-22T03:30:00.71+00:00
Jiale Xue - MSFT 10,081 Reputation points Microsoft Vendor
0 answers

Opening pdf file from url

Hi I am using this code to open a pdf file from a url; var DocPath = "http://mydomain.com/Docs/MyDoc.PDF"; Launcher.TryOpenAsync(new System.Uri(DocPath)); However I am getting the 'Cannot display PDF (MyDoc.PDF cannot be opened)' error. Tried…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,834 questions
asked 2023-09-21T04:12:32.6833333+00:00
-- -- 796 Reputation points
commented 2023-09-22T03:25:29.4266667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 20,966 Reputation points Microsoft Vendor
1 answer

XAML Designer view is not loading

In Visual Studio 2023 Preview Version System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,017 questions
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,474 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,765 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,944 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
687 questions
asked 2023-09-20T14:12:40.2966667+00:00
M Faheem Akhtar 0 Reputation points
edited a comment 2023-09-22T03:15:18.0833333+00:00
Hui Liu-MSFT 21,291 Reputation points Microsoft Vendor
1 answer

WPF custom animation thread

Hello, I have a small simple WPF application (I am learing by doing). I made some custom drawing on a Canvas declared in XAML, by using code in the corresponding C# file. Now I want to access the canvas from another thread to be able to apply geometric…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,017 questions
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,474 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
5,930 questions
asked 2023-09-16T17:21:29.6333333+00:00
Daniel Santos 0 Reputation points
commented 2023-09-22T03:13:47.7866667+00:00
Hui Liu-MSFT 21,291 Reputation points Microsoft Vendor
0 answers

How can I display a PDF file in MAUI?

I plan to display a PDF file on my MAUI app. I tried following the answer at this link (https://learn.microsoft.com/en-us/answers/questions/1310387/how-to-view-the-pdf-file-from-maui), and I have used the…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,834 questions
asked 2023-09-21T04:30:21.89+00:00
韓 金倫 0 Reputation points
commented 2023-09-22T02:58:22.08+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 53,671 Reputation points Microsoft Vendor
2 answers

Windows Forms Designer error : Value cannot be null. Parameter name: instance

I am developing an app using C# Windows Forms with framework DevExpress. My IDE are Visual Studio Community 2022. It is all okay. But after I am updating to Version 17.6.0 the window that I develop cannot load design mode with error message…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,619 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,765 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,944 questions
asked 2023-05-18T02:41:37.96+00:00
Ahmad Ganteng 0 Reputation points
commented 2023-09-22T02:55:17.2466667+00:00
Marcel Popescu 0 Reputation points
3 answers

The type or namespace name 'Notes' could not be found

Hi, How to resolve such issue, to the line below? using Notes.Models;

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,144 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,765 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,944 questions
asked 2023-09-16T06:33:54.24+00:00
Peter_1985 2,116 Reputation points
commented 2023-09-22T02:48:51.4533333+00:00
Peter_1985 2,116 Reputation points
0 answers

SSL connection could not be established with .Net HttpClient

Hi, Attempting to make api calls to Yelp Fusion via .Net 3.1 api but receiving the following error: Error Message: The SSL connection could not be established, see inner exception. Source: System.Net.Http Trace: at…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,546 questions
asked 2023-09-22T00:20:37.9133333+00:00
wrappingduke 1 Reputation point
commented 2023-09-22T02:29:09.64+00:00
Jerry Fu - MSFT 471 Reputation points Microsoft Vendor
1 answer

How can I create a Complex View Like this one in WPF DataGridView C#?

I created this Example and Tried to make it as Simple as Possible so that you can Understand Clearly. I have SQL Server Database Named EmployeesDB that contains 4 Tables as following: 1.       Employees Table which is the Parent Table in this Example. 2.…

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,474 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,765 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,905 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,944 questions
asked 2023-09-20T09:04:32.94+00:00
Mesh Ka 140 Reputation points
commented 2023-09-22T02:16:22.8033333+00:00
Hui Liu-MSFT 21,291 Reputation points Microsoft Vendor
0 answers

How to customize everyone Tab in TabBar

For example, I want create Shell with TabBar. BG of TabBar must be blue, and BG of Current Tab in TabBar must be orange. How can I do it?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,834 questions
asked 2023-09-21T06:41:01.4666667+00:00
Иван Константинов 0 Reputation points
commented 2023-09-22T02:13:39.2733333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 20,966 Reputation points Microsoft Vendor
0 answers

How to fix XA3007: Could not link native shared library: libxamarin-app.so in Xamarin.Android.

I'm trying to run and build my Xamarin.Android project in Visual Studio 2022 to upgrade Target Framework and API Level to 33 Android 13 but got the next error:(how can I solve it ?any idea please)

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,144 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,765 questions
asked 2023-09-21T14:09:10.34+00:00
Herrera, Julian 0 Reputation points
commented 2023-09-22T01:58:35.5133333+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 53,671 Reputation points Microsoft Vendor
0 answers

ASP.Net Core Identity : Credential Obfuscation

I am new to ASP.Net Core Identity and new to Encryption. I followed the article @ https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-6.0&tabs=visual-studio I created a new Web App using ASP.NET Core Web App…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,546 questions
asked 2023-09-22T01:53:45.9833333+00:00
Dan Lee 0 Reputation points
1 answer

Intune App SDK Xamarin Bindings for Android not support after Android 9.0?

Hi Team,  We have a Xamarin Forms app in production that supports Intune. We used MAM policies for Intune support, and they are working. Now it's failing on the Android platform because the device ID isn't retrieving to Intune. Therefore, the…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,144 questions
Microsoft Intune Android
Microsoft Intune Android
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Android: An open-source mobile platform based on the Linux kernel, developed by Google, and maintained by the Open Handset Alliance.
162 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
3,294 questions
asked 2023-09-21T06:03:15.7366667+00:00
Kathirvelu M (KEO) 0 Reputation points
answered 2023-09-22T01:30:22.2966667+00:00
Crystal-MSFT 32,656 Reputation points Microsoft Vendor
0 answers

c# aot try-catch not work

I used c# aot to compile lib for go use. An exception occurs in lib and the process crashes. I hope the process doesn't crash and that bugs can be reported. How can I keep the process from crashing. If it crashes, is there any way to find the location of…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,017 questions
asked 2023-09-20T07:45:26.5166667+00:00
Dan Yang 0 Reputation points
commented 2023-09-22T01:28:31.0766667+00:00
Dan Yang 0 Reputation points
1 answer

l cannot find the Windows.Devices.Sensors Namespace.

l wish to access the Windows Ambient lights sensors on a windows forms app using C# but l cannot find the reference for system device sensors

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,619 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,017 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,944 questions
asked 2023-09-14T23:56:15.7266667+00:00
kil_dren 02 0 Reputation points
commented 2023-09-22T01:25:28.31+00:00
Jiale Xue - MSFT 10,081 Reputation points Microsoft Vendor
1 answer

How do I find the row index on a button click in a gridview?

I have a gridview with a population of students. If there are reject reasons, a button appears in the last column of the gridview. When the button is clicked, I want to make a call to the database to get the reject reason codes. My button click event…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,619 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,017 questions
asked 2023-09-14T03:37:56.38+00:00
RD 40 Reputation points
commented 2023-09-22T01:23:58.2566667+00:00
Jiale Xue - MSFT 10,081 Reputation points Microsoft Vendor
1 answer

Populate html table from api

In the Visits controller I want to populate the index page from api and not from entity model https://visitsapi.azurewebsites.net/api/Visits I want to populate the html table with Visit Date and Notes patid is being passed from earlier…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,546 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
981 questions
asked 2023-09-21T12:20:30.4333333+00:00
Dotnet Engineer 220 Reputation points
edited the question 2023-09-22T01:23:15.66+00:00
Lan Huang-MSFT 17,726 Reputation points Microsoft Vendor
1 answer

My question is how to show all the available input audio devices connected in the pc in c# windows form app. I am facing trouble in making code of it. Can any one help me in this ?

Help me in this

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,619 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
595 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,944 questions
asked 2023-09-13T09:45:55.5+00:00
Vaibhav Pratap Singh 0 Reputation points
commented 2023-09-22T01:23:04.0933333+00:00
Jiale Xue - MSFT 10,081 Reputation points Microsoft Vendor
0 answers

MVC CORE Scaffold view to create api postgressql view

How do I scaffold view in MVC CORE , as it is failing due to lack of primary key I am trying to create api using https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-7.0&tabs=visual-studio CREATE TABLE public.visit…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,546 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
981 questions
asked 2023-09-21T11:45:38.6933333+00:00
Dotnet Engineer 220 Reputation points
edited the question 2023-09-22T01:22:51.2033333+00:00
Lan Huang-MSFT 17,726 Reputation points Microsoft Vendor
2 answers

Problem in the size of the form and controls at the time of execution

I have created a form in the form of image 1, but at the time of execution, the distance between the controls increases and the size of the form also increases. What is the problem? Image 2 is at runtime. I have also used TableLayoutPanel to place the…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,619 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,944 questions
asked 2023-09-11T10:17:47.9166667+00:00
Mohammad Hasan Salmanian 45 Reputation points
commented 2023-09-22T01:20:27.64+00:00
Jiale Xue - MSFT 10,081 Reputation points Microsoft Vendor