11,068 questions with C#-related tags

Sort by: Updated
1 answer

Process ID is 0 in the Event Viewer

Hello All, We have a WPF application built on .Net Framework 4.8. This application writes certain logs into the Event Viewer under the path 'Windows Logs/ Application'. Currently, the logs are written into the 'Event Viewer', but the process id is…

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.
11,068 questions
asked 2024-11-21T14:08:26.7533333+00:00
S Abijith 446 Reputation points
commented 2024-11-26T01:29:21.8066667+00:00
Jiale Xue - MSFT 46,876 Reputation points Microsoft Vendor
1 answer

Build automation - Deployment Center - failing System.Text.Json 8.0.0.4 - Including fix C# ASP.NET

I have getting an error with my latest build using DotNet 8.0 when using the "Deployment Center" on Azure which is connected to my git repo. I couldn't find a fix specifically online so I dug deeper and through trail and error I've come to this…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,650 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.
11,068 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,002 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
1,000 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,964 questions
asked 2024-11-25T15:42:56.3866667+00:00
Poelder, Niels 0 Reputation points
edited the question 2024-11-26T01:21:45.8+00:00
Lan Huang-MSFT 29,911 Reputation points Microsoft Vendor
3 answers

Multiple emails validation with split comma in a Textbox

Hi, If I have a TetxtBox that will be used to send messages to multiple emails, how can I validate these emails that will be inputted in the textbox? The emails are separated by comma. e.g. myfirstmail@hotmail.com, mymail@outlook.com,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,952 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,524 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.
11,068 questions
asked 2024-11-25T16:16:54.6466667+00:00
Donald Symmons 2,946 Reputation points
commented 2024-11-25T22:30:38.5533333+00:00
Michael Taylor 55,221 Reputation points
1 answer

Cannot find dotnet path to dotnet

Hello. I'm trying to set up my C# environment, and run a program. I'm using VSC, with C# and C# DevKit extensions. I tried up to change version of extension to the older version and pin up solution explorer but it brought no result. The output says that…

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.
11,068 questions
asked 2024-11-23T22:04:30.0766667+00:00
Piotr Karmelita 0 Reputation points
edited a comment 2024-11-25T21:34:46.9866667+00:00
Bruce (SqlWork.com) 67,411 Reputation points
1 answer One of the answers was accepted by the question author.

How do I localize the AppDescription of Desktop Bridge apps?

I have a UWP application. The project contains the following files: de-DE\Resources.resw en-US\Resources.resw Each file contains a text with the key AppDescription. en-US is set as the default language in Package.appxmanifest. When submitting to the…

Universal Windows Platform (UWP)
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,788 questions
Microsoft Partner Center
Microsoft Partner Center
A Microsoft website for partners that provides access to product support, a partner community, and other partner services.
1,028 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.
11,068 questions
asked 2024-11-13T13:08:33.4966667+00:00
Heiko 1,261 Reputation points
accepted 2024-11-25T18:33:44.01+00:00
Heiko 1,261 Reputation points
3 answers

Error Debugging in Visual Studio Code: 'ConnectionLostException' when attempting to run C# code

Visual Studio Code Version: 1.79 Operating System: Windows 11 Pro, 64-bit Problem Description: When attempting to debug C# code in Visual Studio Code, the following error message appears: "Your changes cannot be applied due to an unexpected…

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.
11,068 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.
1,006 questions
asked 2023-10-05T08:57:22.1533333+00:00
Ladislav Hochman 30 Reputation points
commented 2024-11-25T18:10:11.15+00:00
Jesualdo Flores Alvarado 0 Reputation points
1 answer

Function App Blob Trigger not working after migrating to isolated model

After migrating my function app from in process (.NET 6) to isolated (.NET 8), I am encountering a runtime error related to the blob binding. I have migrated multiple function apps already, but for this one I am encountering a runtime exception on the…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,164 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.
11,068 questions
asked 2024-11-09T23:37:35.53+00:00
Keijzer, Paul de 0 Reputation points
answered 2024-11-25T16:07:48.38+00:00
Ryan Hill 28,736 Reputation points Microsoft Employee
2 answers

How to search for a file by file name

What is the correct syntax to search for a file using a file name for the below call? GraphClient.Drives[_Drive.Id].SearchWithQ("q").GetAsSearchWithQGetResponseAsync(); I cannot find any documentation on how to do this. Thanks for your help

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.
11,068 questions
asked 2024-11-25T00:38:19.3566667+00:00
Daniel Man 0 Reputation points
answered 2024-11-25T14:04:41.5766667+00:00
Daniel Man 0 Reputation points
1 answer

ASP.NET Gridview Header column not freezing properly

I'm using gridview with freezing header in ASP.NET application. But, freezing is not showing while running the application. what is the issue in the below code...? <%@ Page Language="C#" AutoEventWireup="true"…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,524 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.
11,068 questions
asked 2024-11-19T09:44:51.4+00:00
BeUnique 2,212 Reputation points
edited a comment 2024-11-25T13:07:22.5733333+00:00
BeUnique 2,212 Reputation points
1 answer One of the answers was accepted by the question author.

How to Use system management c# to check application launch

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Management; using…

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.
11,068 questions
asked 2024-11-23T14:26:11.5733333+00:00
MIPAKTEH_1 405 Reputation points
accepted 2024-11-25T13:01:49.9566667+00:00
MIPAKTEH_1 405 Reputation points
0 answers

No client certificate prompt on browser

Hello All, We have a HTTPs Server application built using HTTPsListener class using the .Net Framework 4.8. This server supports mutual authentication. We are using the code attached in the question HttpsListener_Code.txt. But we are facing an issue when…

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.
11,068 questions
asked 2024-11-25T11:39:37.66+00:00
S Abijith 446 Reputation points
0 answers

Windows.Data.Pdf.PdfDocument Crash with file size greater than 2GB

Same issue as here (no replies there, it's an old thread) https://learn.microsoft.com/en-us/answers/questions/248422/windows-data-pdf-pdfdocument-crash My notes: Crash is not catchable which makes it really hard to find reason for issue or…

Universal Windows Platform (UWP)
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.
11,068 questions
asked 2024-11-12T17:59:23.92+00:00
Jérôme S 5 Reputation points
commented 2024-11-25T09:50:02.16+00:00
Junjie Zhu - MSFT 19,321 Reputation points Microsoft Vendor
0 answers

how to extract text from pdf?

Hi every body I have this kind of pdf. it was exported from dwg.I can read dwg and extract text from it . today I need to read this pdf and extract text from it but I can't. i have used many library like itext7 but it didn't works. is there any way to…

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.
11,068 questions
asked 2024-11-22T07:05:15.14+00:00
Farshad Valizade 501 Reputation points
commented 2024-11-25T09:10:09.7066667+00:00
Jiale Xue - MSFT 46,876 Reputation points Microsoft Vendor
1 answer

How to get pixel correctly, when Windows Magnifier is on?

Hi, I would like to know, if there's some way to get correctly pixel color, which is pointed by cursor, when Windows Magnifier is on? This is code sample, which works perfectly whether magnifier is off: public static Color GetColorAtPosition(int x, int…

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.
11,068 questions
asked 2024-11-12T07:51:34.3033333+00:00
Jacob Mordon 225 Reputation points
commented 2024-11-25T08:49:48.1133333+00:00
Jiale Xue - MSFT 46,876 Reputation points Microsoft Vendor
4 answers One of the answers was accepted by the question author.

Validate file type and metadata in Sharepoint Online while uploading

Please can someone advise of the best way to pre-validate a file that is being uploaded to a Modern SharePoint Online site : To check that the filetype is an approved type in a whitelist ( eg pdf , doc or xls ), To check there is no password (or…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,908 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.
11,068 questions
asked 2021-07-26T10:35:05.517+00:00
Richard Scannell 366 Reputation points
commented 2024-11-25T08:40:20.0566667+00:00
Richard Scannell 366 Reputation points
1 answer

struggeling with simple Serial to USB code sniplet error #4294967295

Beeing rather new to C# and Visual Studio I yesterday downloaded the VS community version to learn how to possibly establish a serial communication to my Arduino. (So hopefully my request doesn't sound too silly. ( Before that I was struggeling with…

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.
11,068 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.
1,006 questions
asked 2024-11-24T08:37:16.8+00:00
Optimist 0 Reputation points
answered 2024-11-25T08:36:41.2233333+00:00
Optimist 0 Reputation points
0 answers

System.NullReferenceException: 'Object reference not set to an instance of an object.' when navigating to page in WinUI

I am working with a WinUI project which is built based on the MVVM Toolkit template. When I use NavigationService.NavigateTo(typeof(EmployeeViewModel).FullName!); to navigate to EmployeePage, the program crashes with the bug that…

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.
801 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.
11,068 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.
817 questions
asked 2024-11-23T09:39:11.4333333+00:00
LÊ CAO TUẤN VŨ 0 Reputation points
commented 2024-11-25T01:58:59.56+00:00
Junjie Zhu - MSFT 19,321 Reputation points Microsoft Vendor
1 answer

stripe not working.NullReferenceExceptionObject reference not set to an instance of an object

Hi, Thanks for the help. However, My stripe is not loading. Any help. There is an error: Object not set to an instance of an object. Github Link:https://github.com/Thibaut501/Mango Awaiting your reply, Best Regards, Fabrice

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.
11,068 questions
asked 2024-11-18T05:47:17.8866667+00:00
Thibaut Fabrice 20 Reputation points
commented 2024-11-25T01:12:40.8566667+00:00
Hongrui Yu-MSFT 3,015 Reputation points Microsoft Vendor
1 answer

how do I export C# datatable to Excel 365

I have been using the following code to export a dataTable to Excel. I now have users that have upgraded to Microsoft 365 and this no longer works. My research to make the export work to Excel 365 is not panning out. any help would be grateful public…

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,207 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.
11,068 questions
asked 2024-11-23T05:08:06.78+00:00
Dave Hampel 0 Reputation points
edited the question 2024-11-25T00:50:26.6+00:00
Emi Zhang-MSFT 25,796 Reputation points Microsoft Vendor
1 answer

Only a compilation unit can have top-level units. Error

Only a compilation unit can have top-level units. I couldn't find what caused this error. I don't know what this error means and if there is a solution. Can you help me? I am using Visual Studio Code with .NET9.0 version and C# coding language.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,952 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.
11,068 questions
asked 2024-11-24T14:22:06.73+00:00
Enes Harun 0 Reputation points
answered 2024-11-24T17:39:05.51+00:00
Bruce (SqlWork.com) 67,411 Reputation points