Microsoft Q&A

.NET

15,384 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

15,384 questions with .NET-related tags

Sort by: Updated
1 answer

Blazor Server - How to get the latest uploaded file?

Hi there, In my Blazor Server application, I am uploading an Excel like this; public async Task<int> UploadStocksFile(IFormFile file) { var untrustedFileName = file.FileName; var totalRows = 0; var duplicates = 0; …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 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.
989 questions
asked 2023-06-08T07:47:48.7133333+00:00
Cenk 886 Reputation points
answered 2023-06-09T17:13:48.57+00:00
Bruce (SqlWork.com) 36,581 Reputation points
1 answer

How to fix "WriteCodeFragment" error when build .net core

When I run .net core api project "6.0" on mac I got this error " usr/local/share/dotnet/sdk/7.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.GenerateAssemblyInfo.targets(5,5): Error MSB4018: The "WriteCodeFragment" task…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 questions
asked 2023-06-09T16:32:20.0833333+00:00
Soaad Abdelaziz 0 Reputation points
answered 2023-06-09T17:03:12.7266667+00:00
Bruce (SqlWork.com) 36,581 Reputation points
1 answer

Json bringing back unwanted properties

WebAPI Core (.Net 6) I have a Model class which contains multiple properties. The properties can have empty values. Only the ones i need should be produced. public class ClientFocus { public string? Item {get; set;} public string?…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 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,240 questions
asked 2023-06-09T13:46:25.44+00:00
Keith Viking 20 Reputation points
commented 2023-06-09T16:30:30.4933333+00:00
Keith Viking 20 Reputation points
2 answers

Blazor Reconnection Issue After Locking Smartphone

I'm experiencing a problem with my Blazor Server application and I need your help. When I access my website on a smartphone and lock the device for some time, upon unlocking it, seems that the Blazor connection gets lost at that moment and tries to…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
989 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 questions
asked 2023-06-07T10:57:22.6633333+00:00
Happy Development 10 Reputation points
edited a comment 2023-06-09T16:24:15.3266667+00:00
Bruce (SqlWork.com) 36,581 Reputation points
0 answers

how can we create vertical Tabbar or Menu items in MAUI?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,441 questions
asked 2023-06-09T16:15:01.55+00:00
Sowndarrajan Vijayaragavan 100 Reputation points
0 answers

form responses showed in website

How do I make a website that uploads automatically the answers of a form?

Azure SQL Database
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.
560 questions
asked 2023-06-09T12:10:29.4066667+00:00
Noah 0 Reputation points
commented 2023-06-09T15:48:30.5+00:00
Alberto Morillo 28,036 Reputation points MVP
1 answer

When Microsoft will release Entity Framework 6.x (.NET Full framework) having Microsoft.Data.SQLClient support?

We are migrating our .NET Full framework 4.8 based Data Access Layer projects from System.Data.SQLClient to Micosoft.Data.SQLClient. While it is very straightforward for AD0.NET based projects, we do have some projects where we are also using EF 6.0. As…

Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
246 questions
asked 2023-06-05T07:36:18.9+00:00
Buch, Dishant 0 Reputation points
commented 2023-06-09T15:47:54.15+00:00
Franche 0 Reputation points
0 answers

VB.NET Entity Framework Using multiple databases

I'm trying to setup Entity Framework 6 in my VB.Net desktop application. I can get it working fine using Production database, but, this is a program where you can login to either production or the test database. When I created the model, I set it up to…

Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
246 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,177 questions
asked 2023-06-09T15:41:14.4233333+00:00
Joseph Mancini 41 Reputation points
1 answer One of the answers was accepted by the question author.

System.Net.Http.UnsupportedMediaTypeException: 'No MediaTypeFormatter is available to read an object of type 'IEnumerable`1' from content with media type 'text/html'.'

I am getting Unsupported Media Type Exception whenever I am doing a get request on MVC side on [http://localhost:52541/Employee/Index] . Please check my code and help me to solve the issue EmployeeController.cs from MVC using System; using…

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.
207 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
858 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,240 questions
asked 2023-06-07T01:10:48.87+00:00
Amritpal Singh 20 Reputation points
accepted 2023-06-09T15:28:04.7666667+00:00
Amritpal Singh 20 Reputation points
0 answers

.net maui change Android and iOS overview icon

In .net maui Android when the "Overview" button in clicked an Icon is shown. How do I change that icon ? On iOS how to change the ".NET" to something else ?:

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,186 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,441 questions
asked 2023-06-08T16:10:47.48+00:00
Eigil Krogh Sorensen 61 Reputation points
commented 2023-06-09T15:09:48.0833333+00:00
Eigil Krogh Sorensen 61 Reputation points
0 answers

How to fix bug of iOS of KeyboardOverlapRenderer

AppDelegate.cs KeyboardOverlapRenderer.Init(); After opening the website with webview function, when inputting with the text keyboard, it is difficult to enter the content as it rises above the content. AppDelegate.cs: public override bool…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,014 questions
asked 2023-06-08T00:23:06.7433333+00:00
Westview Investment 0 Reputation points
commented 2023-06-09T15:02:41.0833333+00:00
Westview Investment 0 Reputation points
0 answers

No forms appearing in custom template VS 2022 Mac or PC

I have been looking over the material for the new templating engine, https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-item-template and https://github.com/dotnet/templating/tree/main, and have created a .template.json file…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,177 questions
asked 2023-06-02T18:42:29.7566667+00:00
Gregory Lange 0 Reputation points
commented 2023-06-09T14:56:33.8633333+00:00
Gregory Lange 0 Reputation points
0 answers

Identity Server 4 Not Login Showing 403

I am getting error after clicking login 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. In development mode it working fine but after publishing the project…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 questions
asked 2023-06-09T14:31:09.4333333+00:00
Prathamesh Shende 306 Reputation points
1 answer One of the answers was accepted by the question author.

I need to hold the selected ListView Item in a temporary variable.

I need to hold the selected ListView Item in a temporary variable so that the user can Cancel an Edit operation and the ListView Item will revert back to its original values. I can't understand why Temporaryselectedudf changes to the SelectedUdf value.…

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,240 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,441 questions
asked 2023-06-08T18:53:07.3566667+00:00
Ronald Rex 811 Reputation points
commented 2023-06-09T14:02:10.18+00:00
Ronald Rex 811 Reputation points
3 answers

How to fix "The target process exited without raising as CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core"

My application console application is build on .net core 7 and gave error when running on docker container, several other console applications running properly but one gave problem. Docker container logs given below: Targer OS is linux. I have tried…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 questions
asked 2023-01-24T11:56:16.52+00:00
Faisal suleman 5 Reputation points
commented 2023-06-09T12:58:01.43+00:00
Jerome Lecerf 0 Reputation points
0 answers

How do I fix the error: "Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'dotnet-aspnet-codegenerator-design, Version=7.0.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'."

The above error happens when I try to create a scaffold for the identity, I have installed all the necessary packages that are needed for code generation but it still keeps giving me the same output. I also tried rebuilding the project and restarting…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,177 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,173 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
858 questions
asked 2023-06-09T10:23:15.2333333+00:00
Emmanuel Genga 0 Reputation points
commented 2023-06-09T12:06:02.8266667+00:00
Emmanuel Genga 0 Reputation points
0 answers

Xamarin Forms: Implement push notification tapping on android platform

I have implemented push notification on my Xamarin forms application using FCM. My code [Service(Enabled = true, Exported = true)] [IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })] public class FirebaseNotificationService :…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,014 questions
asked 2023-06-07T14:54:25.0666667+00:00
Sreejith Sreenivasan 111 Reputation points
edited a comment 2023-06-09T11:38:19.6+00:00
Sreejith Sreenivasan 111 Reputation points
1 answer One of the answers was accepted by the question author.

Maui android debugging exception in correct situation

Hello all in the middle of debug stepping in a correct situation suddenly I got this ex. what this mean and what I need to do. Thank you very much.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,441 questions
asked 2023-06-07T11:36:40.9066667+00:00
Haviv Elbsz 826 Reputation points
accepted 2023-06-09T11:12:54.02+00:00
Haviv Elbsz 826 Reputation points
1 answer

C# ASP.NET MVC - How to retrieve all values from a from that can have unknown input field count

I have a simple form, that allows the user to edit a drop down list that exists within another form. In this the user can view the current drop down list values, edit them, delete them or create more. This opens this form in a modal: Here you can edit…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,480 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
858 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,177 questions
asked 2023-06-09T07:49:58.66+00:00
ChrisU 226 Reputation points
answered 2023-06-09T10:48:27.46+00:00
AgaveJoe 22,796 Reputation points
0 answers

ChannelFactory resolving an address for a different tenant

We have a multi tenant architecture in the cloud. I have noticed a strange behavior where often App1 of tenant 1 calls App2 of tenant 2. This is not a frequent behavior and happens few times a day. Below is a generic code snippet that calls App2 from…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,177 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,348 questions
asked 2023-06-06T08:10:50.89+00:00
Rohit Kamble 0 Reputation points
edited the question 2023-06-09T10:38:57.16+00:00
Rohit Kamble 0 Reputation points