Microsoft Q&A

.NET

12,867 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

12,867 questions with .NET-related tags

Sort by: Updated
0 answers

Xamarin.Forms Speakerphone Stop Activating Suddenly on Android 10

I have App that has been working for years on Android 10, 11, 12 to Turn On/Off SpeakerPhone for Inbound and Outbound calls, but now it works sometimes on Inbound calls but never on Outbound calls. Here is a simple BroadcastReciever and…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,803 questions
asked 2023-01-17T22:27:57.81+00:00
Universal Camera 286 Reputation points
edited the question 2023-01-28T20:25:52.55+00:00
Universal Camera 286 Reputation points
1 answer

how to handle exception with customized error message in json format in webapi in c#

how to handle exception with customized error message in json format in webapi in c# also my webapi calling different one drive api like delete file , download file etc and my webapi return type like IActionResult and jsonstring Any body can help

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.
143 questions
asked 2023-01-28T12:49:01.5266667+00:00
Pradyut Sinha 11 Reputation points
edited an answer 2023-01-28T19:44:43.5+00:00
AgaveJoe 16,946 Reputation points
1 answer

ISS RDP Site still showing insecure after cert issued

I have gone and got a certificate for *.contoso.com and [contoso.com] . I have installed it against the default website on windows server IIS. I am now browsing (using the same server) to https://dc1.internal.contoso.com/RDWeb/Pages/en-US/login.aspx and…

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
3,030 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
599 questions
Internet Information Services
asked 2023-01-28T19:18:31.6233333+00:00
Al Grant 1 Reputation point
edited the question 2023-01-28T19:44:20.2366667+00:00
TP 10,496 Reputation points
0 answers

Reading form fields after submit (POST) in Blazor Server?

I have a login form in Blazor Server App and use POST to send login data (email and password). <form id="LoginForm" Model="LoginModel" action="cookie" method="post"> …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
874 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 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,918 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
582 questions
asked 2023-01-28T19:43:14.55+00:00
perfect code 101 Reputation points
edited the question 2023-01-28T19:43:53.22+00:00
perfect code 101 Reputation points
0 answers

How to obtain the notifications' deviceToken in MAUI iOS in C#?

In executing the following, how do I get the deviceToken? public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { NSData deviceToken; // Version check if…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
874 questions
Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
153 questions
asked 2023-01-28T18:54:43.4433333+00:00
Marc George 61 Reputation points
2 answers One of the answers was accepted by the question author.

Logout (delete Auth-Cookie) only possible via form!

I have a Blazor server application (see my post here: https://learn.microsoft.com/en-us/answers/questions/1164837/aspnet-authentication-works-but-value-for-user-ide). Now I have implemented a cookie authentication. This works very well via a login and…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
874 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 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.
782 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,918 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
582 questions
asked 2023-01-28T13:26:22.5033333+00:00
perfect code 101 Reputation points
commented 2023-01-28T17:41:48.8333333+00:00
perfect code 101 Reputation points
1 answer

404 issue to the file

Hi, Due to issue like What to adjust below? <body style="background-color: ???; background-image:url(beautiful_Currency0e.jpg);">

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
443 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.
390 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,175 questions
asked 2023-01-28T08:50:16.07+00:00
Peter_1985 1,826 Reputation points
edited a comment 2023-01-28T16:54:29.2433333+00:00
AgaveJoe 16,946 Reputation points
0 answers

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,529 questions
Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,305 questions
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,074 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,569 questions
asked 2023-01-28T15:31:40.0166667+00:00
Dan 0 Reputation points
0 answers

Export data to excel in .NET Core

Hi All, I am developing an application in .NET Core with angular client. I have a scenario where user click on Download button and data from SQL Server will be exported to excel sheet in .NET Core WebAPI. The generated and downloaded sheet will…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 questions
asked 2023-01-28T14:37:20.9733333+00:00
Pratham Jain 61 Reputation points
1 answer

How to fix canonical issues with WordPress on App Services

I need to redirect www.example.com to example.com. I have a custom domain with SSL, https enforced. Http requests are being redirected to https and working as expected. Where, or how, do I configure a redirect to get the www.example to redirect to…

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,305 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
558 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,615 questions
asked 2023-01-28T13:29:04.7433333+00:00
Joe O 0 Reputation points
answered 2023-01-28T13:59:18.4533333+00:00
Marshaljs 26,191 Reputation points
0 answers

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,918 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
582 questions
Internet Information Services
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
154 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.
954 questions
asked 2023-01-28T13:47:57.62+00:00
Tabish Ashraf 0 Reputation points
1 answer

.NET Core API Framework Warning

Hi All, I am developing an application using .NET Core with angular client. I am exporting the data to excel and generating the file in C# .NET Core. I am using a nuget package for the same. After installing the nuget package in the project I am getting…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 questions
asked 2023-01-27T14:03:43.83+00:00
Pratham Jain 61 Reputation points
commented 2023-01-28T13:37:20.8166667+00:00
AgaveJoe 16,946 Reputation points
0 answers

unable to upload

unable to upload a large file in one drive by using the below code can any body tell what is wrong in the below code . Please help [HttpPost] [Route("Uploadlargefile")] public async Task<string>…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,175 questions
asked 2023-01-28T13:07:11.22+00:00
Pradyut Sinha 11 Reputation points
2 answers One of the answers was accepted by the question author.

Downgrade ASP.NET Core app from .NET 6.0 to .NET Core 3.1

I have made an ASP.NET Core web application, using .NET 6.0. However, when I obtained a hosting server, I learnt that my hosting provider has installed .NET 5.0. As a result, I now have to downgrade my project from .NET 6.0 to a previous version.…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 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.
782 questions
asked 2022-09-17T11:44:11.667+00:00
PPCMD 41 Reputation points
accepted 2023-01-28T12:04:03.31+00:00
PPCMD 41 Reputation points
2 answers

Visual Studio Community 2022 (64-bit) v17.4.4 not showing any compile time errors for MAUI project.

Hi, I am using Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.4 for my MAUI projects but is not showing any compile time errors . is it any plugin missing?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
874 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,392 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.
693 questions
asked 2023-01-24T09:18:11.29+00:00
Sachin 21 Reputation points
commented 2023-01-28T11:18:43.94+00:00
Sachin 21 Reputation points
1 answer

Loop through Controls in ScrollView and Get the Data

Hi, In below XAML: <ScrollView x:Name="ScrollViewDetails" Grid.Row="1"> <VerticalStackLayout> <VerticalStackLayout x:Name="StackLayoutPhones"> <BindableLayout.ItemTemplate> …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
874 questions
asked 2023-01-20T21:11:41.77+00:00
Jassim Al Rahma 1,086 Reputation points
commented 2023-01-28T10:10:59.82+00:00
Jassim Al Rahma 1,086 Reputation points
1 answer One of the answers was accepted by the question author.

Get Contact details by Id

Hi, How can I get the Contact details by its Id? like this: var contact = await Microsoft.Maui.ApplicationModel.Communication.Contacts.Default.PickContactAsync("contact-id-here"); Thanks, Jassim

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
874 questions
asked 2023-01-19T22:50:06.6066667+00:00
Jassim Al Rahma 1,086 Reputation points
accepted 2023-01-28T10:06:19.1333333+00:00
Jassim Al Rahma 1,086 Reputation points
1 answer One of the answers was accepted by the question author.

Datagridview Font When editing cell

I have not used the Datagridview before so have started a test Windows Forms app to learn about it. I notice that when I edit a cell the font size changes to something too small to read, is there a way to prevent this?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
599 questions
asked 2023-01-27T16:02:10.4366667+00:00
Jeff Gaines 21 Reputation points
commented 2023-01-28T09:40:34.1133333+00:00
Jeff Gaines 21 Reputation points
1 answer

Breaking out large app into smaller apps.

Hi, I have a large mobile app that performs many different functions and want to try and break that out into smaller apps that do only a small portion of what the main app does. At the current time the work around I have just is a hard coded string…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,803 questions
asked 2021-03-02T20:04:25.737+00:00
era148 1 Reputation point
answered 2023-01-28T09:31:05.2566667+00:00
Adrian Monk 0 Reputation points
6 answers One of the answers was accepted by the question author.

How to show a loading prompt in view before the controller loaded the data?

With asp.net core 6.0 mvc It needs several seconds to load data in controller,before that ,how to show a loading promt in the view?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,529 questions
asked 2022-05-23T03:27:10.04+00:00
Alick Wang 1 Reputation point
accepted 2023-01-28T09:02:25.6233333+00:00
Alick Wang 1 Reputation point