11,052 questions with C#-related tags

Sort by: Updated
0 answers

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,052 questions
asked 2024-11-21T14:08:26.7533333+00:00
S Abijith 446 Reputation points
1 answer One of the answers was accepted by the question author.

I have method to call from OnCreated_.How to call two string in one time.

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; 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,052 questions
asked 2024-11-20T12:47:13.17+00:00
MIPAKTEH_1 385 Reputation points
accepted 2024-11-21T13:48:03.7133333+00:00
MIPAKTEH_1 385 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,519 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,052 questions
asked 2024-11-19T09:44:51.4+00:00
BeUnique 2,212 Reputation points
commented 2024-11-21T13:23:42.83+00:00
Jalpa Panchal-MSFT 555 Reputation points Microsoft Vendor
1 answer

UWP pipe client and C++ Fulltrustprocess pipe server - Access to the path is denied

Hello UWP experts, I get "Access to the path is denied" when connecting a UWP namedpipeclient to C++ Fulltrust process namedpipe server in packaged (WAPP) and non packaged mode. Its a simple piece of code to see how the namedpipe works betweek…

Universal Windows Platform (UWP)
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,666 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,052 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.
3,774 questions
asked 2024-11-19T04:13:17.18+00:00
DotNET Fan 271 Reputation points
edited a comment 2024-11-21T12:56:21.58+00:00
Darran Rowe 1,046 Reputation points
0 answers

How to access at run-time the value of an IEnumerable<T>

Good day all: I'm developing a WEB API that returns a paged response to a jQuerydatatable end point. Because the code repeats itself, I encapsulated all the logic in the generic procedure below. The code works perfectly when I pass the class (entity) I…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,638 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,052 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
346 questions
asked 2024-11-21T12:22:44.3566667+00:00
Jose Daniel Navarro Brito 61 Reputation points
1 answer One of the answers was accepted by the question author.

Setting PropertyBag Property without allowing custom scripts

We are setting Propery Bag values of a Sharepoint Online Web from an Azure Function using the Microsoft.SharePoint.Client (Microsoft.SharePointOnline.CSOM) Library with the SetPropertyBagValue. For setting a Property Bag value the "Allow Custom…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,897 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,052 questions
asked 2024-07-04T12:35:08.1166667+00:00
Martin Ewald 20 Reputation points
commented 2024-11-21T11:46:24.49+00:00
Mark van de Donk 0 Reputation points
0 answers

How to Set Up a Computer-Specific Term Licensing System Structure with C#?

Hello, I am developing a software with C# and I want to license users for 1, 2 or 3 years specific to their computers. I want to control the licensing period information by associating it with an ID specific to the user computer and using an encrypted…

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,052 questions
asked 2024-11-21T11:35:27.8966667+00:00
fatih uyanık 100 Reputation points
0 answers

Cant able to get all properties of user by using Graph API in C# ?

Code Line => User user = await graphClient.Users[userObjectId].Request().GetAsync().ConfigureAwait(false); I can able to fetch Green highlighted one but other than that getting null in "user1" (code line) object. question => Is…

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
7,238 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,371 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,052 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,263 questions
asked 2024-11-21T10:26:25.2533333+00:00
Venkatesh Naik 20 Reputation points
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,052 questions
asked 2024-11-12T07:51:34.3033333+00:00
Jacob Mordon 225 Reputation points
commented 2024-11-21T09:49:33.1433333+00:00
Jacob Mordon 225 Reputation points
1 answer

Configure AD Groups to use with Roles in .NET Core (C# 8) MVC

I am trying to use policy based authorisation in an MVC app in C# .NET CORE (8) , using membership of OnPrem AD groups to assign roles . This is a snippet of the appsettings.json telling the system I want to grant the Admin role to members of AD…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,638 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,052 questions
asked 2024-11-20T15:33:49.45+00:00
Richard Scannell 361 Reputation points
answered 2024-11-21T08:10:00.61+00:00
Richard Scannell 361 Reputation points
1 answer One of the answers was accepted by the question author.

How to handle nullreference exception in "NM_CUSTOMDRAW" notification message?

Hello, I have a windows forms application having a user control . The user control has a Treeview named as TriView. TriView's drawmode is set to OwnerDrawAll. The form is visible all the time. When I run my application and switch between the…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,903 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,944 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,052 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,743 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,172 questions
asked 2022-06-28T12:23:02.77+00:00
Rashmi Gupta 81 Reputation points
commented 2024-11-21T07:58:03.1433333+00:00
Ruri Nanase 0 Reputation points
0 answers

How to use a svg file as icon in a .net maui class library?

I'm moving some code to a sub project, for better modularity. As I don't want to reference the main app, I want to import the resource to this sub project. Here is the code I need help with: var notificationBuilder = new NotificationCompat.Builder(this,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,944 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,649 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,052 questions
asked 2024-11-20T07:15:31.08+00:00
AbsolutelyFreeWeb 1 Reputation point
commented 2024-11-21T05:56:19.9766667+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 32,781 Reputation points Microsoft Vendor
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,052 questions
asked 2024-11-12T17:59:23.92+00:00
Jérôme S 5 Reputation points
commented 2024-11-21T04:10:54.5366667+00:00
Junjie Zhu - MSFT 19,216 Reputation points Microsoft Vendor
0 answers

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,024 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,052 questions
asked 2024-11-13T13:08:33.4966667+00:00
Heiko 1,261 Reputation points
edited a comment 2024-11-21T04:06:16.16+00:00
Junjie Zhu - MSFT 19,216 Reputation points Microsoft Vendor
1 answer

C# how to pass a string from a list of object to a List<T>.Sort() method please?

How to pass a string (level) from a list of object to a List<T>.Sort() method please? Data: List<DirItem> items = new List<DirItem> { new DirItem { level="3.5-1", name="Hi",…

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,052 questions
asked 2024-11-08T17:43:43.0266667+00:00
Arny CP 0 Reputation points
edited the question 2024-11-21T03:30:09.3033333+00:00
Tianyu Sun-MSFT 31,411 Reputation points Microsoft Vendor
4 answers One of the answers was accepted by the question author.

Attempting to align contents of GridView cells on ASP.NET Web Forms

Hello, I am attempting to align the contents of GridView cells on ASP.NET Web Forms, but I am encountering an issue where the GridView header is not aligning as expected. Here is how it looks in the image below What steps can be taken to resolve this,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,944 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,519 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,052 questions
asked 2024-11-10T11:55:41.8966667+00:00
Donald Symmons 2,946 Reputation points
commented 2024-11-21T02:07:50.91+00:00
Donald Symmons 2,946 Reputation points
1 answer

WinUI 3 - How to Retrieve ActivatedEventArgs Multiple Times?

The documentation states that AppInstance.GetActivatedEventArgs this method will only return the arguments the first time it is called in an app. If a packed single-instanced WinUI 3 app is activated from a protocol multiple times, what approach can…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,944 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.
798 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,052 questions
asked 2024-11-05T03:15:54.47+00:00
Lee Feng 156 Reputation points
commented 2024-11-21T01:50:32.14+00:00
Roy Li - MSFT 33,461 Reputation points Microsoft Vendor
1 answer

Cannot click into or scroll word document after opening .... Until I hit Ctrl+Home or interact with some options in the Ribbon Bar

Some of our clients have started reporting a strange issue in Microsoft Word after we open documents using Microsoft.Office.Interop.Word automation When they open a Word document they think that MS Word is hanging. The first indicator that it's not…

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,743 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,052 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,021 questions
asked 2024-11-01T08:38:27.7966667+00:00
Giuseppe Carafa 96 Reputation points
answered 2024-11-20T21:01:57.63+00:00
westomatic 0 Reputation points
2 answers One of the answers was accepted by the question author.

Error when try read data from Excel File in ASP.NET MVC

In an ASP.NET MVC app, I am trying to read data from Excel file but I get this error: The error appears in production mode, but in development mode there's no problem. I am making host on Local Host on my computer Microsoft Excel cannot access the file…

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,519 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,052 questions
asked 2023-10-03T17:37:39.96+00:00
mostafa ahmed 41 Reputation points
commented 2024-11-20T20:29:56.9166667+00:00
Dave Kiewra 1 Reputation point
3 answers

Convert SQl query to Linq query in c#

Below is my full sql query need to convert into linq query delcare @personId int=12345 select distinct p.fName, p.lName, p.personId, p.assignedId,0 doId,…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,061 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,052 questions
asked 2024-11-19T19:16:20.94+00:00
coder rock 376 Reputation points
commented 2024-11-20T15:51:43.32+00:00
Bruce (SqlWork.com) 67,176 Reputation points