Microsoft Q&A

.NET

12,910 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

12,910 questions with .NET-related tags

Sort by: Updated
0 answers

How should a service exit to prevent an error?

I'm developing a Windows service in C#, .NET 6.0 following the instructions on https://learn.microsoft.com/en-us/dotnet/core/extensions/windows-service The service runs as expected, but when I stop the service, it logs an error A task was…

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.
6,940 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
613 questions
asked 2023-01-30T23:11:11.52+00:00
Andy Reynolds 0 Reputation points
1 answer One of the answers was accepted by the question author.

Debugging Shell Navigation

Hello Friends, I was wondering if anyone knows where to put my DebuggerDisplay Attribute annotations so that I can debug my navigation requests. Thanks !!! Debugging navigation Some of the Shell classes are decorated with the DebuggerDisplayAttribute,…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
886 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.
6,940 questions
asked 2023-01-27T19:08:08.5433333+00:00
Ronald Rex 506 Reputation points
accepted 2023-01-30T23:01:26.04+00:00
Ronald Rex 506 Reputation points
2 answers One of the answers was accepted by the question author.

Displaying Deserialized JSON Data In Razor Page

Hello Everyone, I am using Visual Studio 2022 (x64) Community Version Entity Framework Core 6 C# Razor Pages (Not MVC) I am pulling data from the Google YouTube API, and want to display it on a .cshtml page. Here is a sample of the data: { …

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.
6,940 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,403 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.
146 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,184 questions
asked 2023-01-30T02:39:33.7466667+00:00
Brian Ashcraft 0 Reputation points
commented 2023-01-30T22:52:28.9233333+00:00
Brian Ashcraft 0 Reputation points
4 answers One of the answers was accepted by the question author.

c# use tablename as variable

How can i use tablename as a variable in sql query? "select * from table_name " table_name must be variable.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 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.
6,940 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.
8,487 questions
asked 2023-01-30T06:44:59.1066667+00:00
ÖMER NASUHİ KESKİN 0 Reputation points
answered 2023-01-30T22:25:01.1933333+00:00
Erland Sommarskog 67,721 Reputation points Microsoft MVP
1 answer

How to terminate a process cleanly from a background service

I have developed a program which runs as a Windows service. This program starts a process to run another exe file. It's developed in C# with .NET 6.0. I know I can use Process.Kill() to terminate the process, but I'd like to try to end the process…

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.
6,940 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
613 questions
asked 2023-01-30T16:28:06.2466667+00:00
Andy Reynolds 0 Reputation points
commented 2023-01-30T21:42:56.81+00:00
RLWA32 28,651 Reputation points
0 answers

Button click event is not firing

Greetings again dear experts. I have an .aspx page with two sections One section allows our users to enter records displays existing records for update. The second allows users to preview the records, whether insert or update before submitting to the…

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.
397 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,828 questions
asked 2023-01-30T04:06:30.6633333+00:00
Simflex 81 Reputation points
commented 2023-01-30T19:53:53.64+00:00
Simflex 81 Reputation points
1 answer

How to System.BadImageFormatException (No string associated with token) error solved

Our Web Application build in .NET 4.8 and hosted as an azure app service throws this exception in some views. Here is the stack trace for one of these exceptions. We have run out of options to try certain things but it is stuck like that. We have tried…

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.
6,940 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
588 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.
956 questions
Internet Information Services
asked 2023-01-28T13:47:57.62+00:00
Tabish Ashraf 0 Reputation points
answered 2023-01-30T18:31:30.25+00:00
Bruce (SqlWork.com) 28,031 Reputation points
0 answers

Failed to create release build in iOS due to bitcode issue of Plugin.Firebase in .net MAUI having dotnet 7.

Have implemented fcm push notification in MAUI having .net version 7 from the below link : https://cedricgabrang.medium.com/firebase-push-notifications-in-net-maui-ios-2f4388bf1ac. For testing , creating release build to test on…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,807 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.
6,940 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
613 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
886 questions
Microsoft Build
Microsoft Build
A Microsoft platform for building applications with Visual Studio and .NET on Windows.
368 questions
asked 2023-01-30T18:27:08.49+00:00
Priya Baghel 1 Reputation point
2 answers

Sodium.js error

Does anyone know what is sodium.js and what is this error means? This error started showing in my asp.net MVC app. I have autocomplete on my text field which uses json call which queries database and I've noticed that even the autocomplete works,…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
588 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,184 questions
asked 2023-01-27T19:24:15.99+00:00
Joe Green 141 Reputation points
answered 2023-01-30T18:10:53.3066667+00:00
Joe Green 141 Reputation points
0 answers

Hoe to share a document link for external user using one drive API

I am using Onedrive api for sharle a document link to extenal user in c# it is not working

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,184 questions
asked 2023-01-30T17:58:08.58+00:00
Pradyut Sinha 11 Reputation points
1 answer

Azure multi tenant microservice architecture and many app registrations

Let's say I have a multi tentant microservice architecture fronted with an API gateway of which a client app calls to access the microservices behind. Let's say it's grown to a complex system that has 50 microservices all needing user…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 questions
Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,315 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,607 questions
asked 2023-01-28T15:31:40.0166667+00:00
Dan 0 Reputation points
answered 2023-01-30T17:15:27.0666667+00:00
Bruce (SqlWork.com) 28,031 Reputation points
1 answer

Upgrade my Azure Function from .net Core 3.1 to .net Core 7.0. Error "'Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstraction

I have an Azure Function which run on .net core 3.1, but when i change the .net version from 3.1 to 7 i got this error:- System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0,…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,578 questions
asked 2023-01-27T16:29:45.1233333+00:00
john john 676 Reputation points
answered 2023-01-30T17:05:16.2333333+00:00
Bruce (SqlWork.com) 28,031 Reputation points
2 answers

Can Add-In include WebAssembly C# code

I wonder if Add-Ins supports C# WebAssembly / Blazor so I can code in C# and not only java script to develop a more sophisticated Add-in? If it is, I would like to know how I could use C# for an Add-In in Outlook to then be deployed in Marketplace.

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.
1,942 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.
783 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.
6,940 questions
asked 2021-08-10T14:48:35.303+00:00
Gunnar N 1 Reputation point
answered 2023-01-30T16:58:50.1566667+00:00
Craig Callender 1 Reputation point
0 answers

Fix database errors in visual studio

The code for selection of a row in data grud view doesnt work for me (Microsoft visual studio 2019)

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,403 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,184 questions
asked 2023-01-30T16:21:53.3+00:00
Kenny Robby 0 Reputation points
commented 2023-01-30T16:53:02.9+00:00
AgaveJoe 17,021 Reputation points
1 answer

Referencing multiple projects with top-level statements

I have two projects A and B. Each project has a single top-level statement Program.cs file. I made the Program class visible from each project by enabling internals: <InternalsVisibleTo Include="MyTargetProject" /> The problem is 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.
6,940 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
613 questions
asked 2023-01-30T16:34:45.33+00:00
Ernest 1 Reputation point
answered 2023-01-30T16:47:49.4833333+00:00
Bruce (SqlWork.com) 28,031 Reputation points
1 answer

How to fix error in visual studio 2019

The code .DataSource = ds.Tables[0]; doesn't work for me. What might be the error?? In Microsoft vs 2019

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
8,487 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,184 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
291 questions
asked 2023-01-30T16:17:13.57+00:00
Kenny Robby 0 Reputation points
answered 2023-01-30T16:28:35.2866667+00:00
Bjoern Peters 6,691 Reputation points Microsoft MVP
0 answers

Timespan.FromHours(24) not working after publish application on Azure app service

Hi i hi have one small simple application which logs the information. So I have one basic application which is using System.Threading.Timer and setup timer to run my function once a day and create logs. Ex. _timer = new Timer(callbackAsync, null,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
613 questions
Azure App Service Static Web Apps
asked 2023-01-30T05:41:27.6566667+00:00
Rohan 0 Reputation points
commented 2023-01-30T16:24:35.8633333+00:00
Rohan 0 Reputation points
1 answer

"dotnet" is not recognized

I have installed a fresh Windows10, and downloaded the "dotnet-install.ps1" from Microsoft: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script And I ran it with a powershell window: > .\dotnet-install.ps1 -Channel 7.0…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
613 questions
asked 2023-01-30T14:38:11.9433333+00:00
Daniel ‪ 0 Reputation points
answered 2023-01-30T15:52:03.47+00:00
Michael Taylor 37,616 Reputation points
1 answer

xamarin android emulator android > 9 ? how to make ?

Hello all, I have vs 2022 entreprise installed on my computer all works fine with emulator below android 9 .. i can push my app , debug ans so on .. I've try to make an android 10 / 11 and so on but impossible to start it ,, Of course i have the sdk who…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,807 questions
asked 2023-01-26T09:28:50.3866667+00:00
cristopheB 476 Reputation points
answered 2023-01-30T15:42:13.55+00:00
cristopheB 476 Reputation points
2 answers

fileupload emty error !!!

Hello friends, if the file upload is empty SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Holding_DB"].ConnectionString); con.Open(); SqlCommand cmdSelect = new…

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.
6,940 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,184 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.
397 questions
asked 2023-01-30T11:57:08.06+00:00
kadir koçaslan 0 Reputation points
edited a comment 2023-01-30T15:31:53.7033333+00:00
AgaveJoe 17,021 Reputation points