Microsoft Q&A

.NET

13,069 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

13,069 questions with .NET-related tags

Sort by: Updated
1 answer

System.InvalidOperationException: 'Invalid operation. The connection is closed.'

hello All, I am getting this error when calling a small function. I am calling this function twice. Below is my code: public async Task<EmployeeInfo?> GetEmployeeByEmployeeNumber(string employeeId) { List<int> emplyoeeInfoId =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
616 questions
asked 2023-02-06T03:09:17.0033333+00:00
Anjali Agarwal 121 Reputation points
edited a comment 2023-02-07T03:43:04.96+00:00
Anjali Agarwal 121 Reputation points
0 answers

how to fix reportviewer rendering exception when EnablePartialRendering on ScriptManager is set to true

WARNING! There was an error parsing the document In our MVC application we are calling an ASPx page (using an iframe) that contains a reportviewer control, the reports are loading but when I click "Show report" button after I give 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.
410 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,125 questions
asked 2023-02-06T09:48:38.77+00:00
Gimi 0 Reputation points
edited the question 2023-02-07T03:13:48.55+00:00
XuDong Peng-MSFT 4,576 Reputation points Microsoft Employee
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,820 questions
asked 2023-01-26T09:28:50.3866667+00:00
cristopheB 476 Reputation points
edited an answer 2023-02-07T02:39:22.3966667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,821 Reputation points Microsoft Employee
0 answers

why invoking a multi-targeting library doesn`t work as expected?

I`m currently learning how to create multi-targeting library with dotnet. I created a multi-targeting library in .net6 and .net 7. However, when I calling the method in this library, the output doesn`t work as my expectation. excution command: in…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
638 questions
asked 2023-02-04T07:27:37.1966667+00:00
William Liu 121 Reputation points
commented 2023-02-07T02:26:40.0166667+00:00
William Liu 121 Reputation points
1 answer

System.IO.DirectoryNotFoundException: 'Could not find a part of the path 'C:\MyApp\API\Live\Images\Company Logo.png'

Hi All, I am developing an application in .Net Core WebAPI in C#. I need to access company logo and insert it into excel while exporting data to excel. I have added Images folder with logo images to my startup WebAPI project in solution for this purpose.…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 questions
asked 2023-02-06T10:17:43.6433333+00:00
Pratham Jain 81 Reputation points
answered 2023-02-07T02:23:29.3766667+00:00
Zhi Lv - MSFT 18,886 Reputation points Microsoft Employee
1 answer

How to load data of employee if drop down list selected changed ?

I work on MVC web application using c# by ado.net I face issue I can't display employee data based on drop down selected index changed . so if user select Pending Request from drop down list it will select employee that have select employee status 1…

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.
7,021 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
616 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
638 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,208 questions
asked 2023-02-06T01:14:50.4233333+00:00
Ahmed Salah Abed Elaziz 0 Reputation points
edited an answer 2023-02-07T02:22:44.1966667+00:00
QiYou-MSFT 851 Reputation points Microsoft Employee
1 answer

Bitmap Colors & Editing in CMYK

I have a Xamarin.Android app with an Android.Graphics.Bitmap for which I need to view each pixel's color in CMYK (as opposed to RGB). I also need to be able to rotate & crop the Bitmap. I am not extremely familiar with working with graphics &…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
638 questions
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,820 questions
asked 2023-02-06T01:33:06.46+00:00
Nathan Sokalski 3,976 Reputation points
edited an answer 2023-02-07T02:22:35.08+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,821 Reputation points Microsoft Employee
1 answer

Inject IHttpClientFactory To Create HttpClient through a class

I'm trying to Use IHttpClientFactory To Create HttpClient (ref: https://www.rahulpnath.com/blog/are-you-using-httpclient-in-the-right-way/). At the end of the page, it says: "The Controller class can now use the WeatherService and call it to get…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 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.
7,021 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
616 questions
asked 2023-02-06T07:30:50.62+00:00
winanjaya 41 Reputation points
commented 2023-02-07T02:11:20.7633333+00:00
Xinran Shen - MSFT 1,041 Reputation points Microsoft Employee
2 answers

Process.Start does not work anymore

I have a simple code that used to work, but it does not work anymore. Process.Start("Some Website Address"); Also, the code below works: Process.Start(@"C:\Program Files\Google\Chrome\Application\chrome.exe", "Some Website…

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.
7,021 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
638 questions
asked 2023-02-06T19:26:26.12+00:00
Skysmith 46 Reputation points
answered 2023-02-07T02:03:56.58+00:00
Jack J Jun 19,381 Reputation points Microsoft Employee
1 answer

Why I got 401 occasionally?

Hi All, I'm calling HTTPClient with dynamic token in a loop, but occasionally it thrown me 401 (Unauthorized). What did I do wrong in my test codes below? Is it correct to put the Authorization in there?, it looks like in some time it doesn't reset…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 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.
7,021 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
616 questions
asked 2023-02-06T00:29:25.2566667+00:00
winanjaya 41 Reputation points
commented 2023-02-07T01:52:36.66+00:00
winanjaya 41 Reputation points
2 answers

Verify User Login credentials via web service

Hello all: I am messing with a web site created with MVC and Individual Accounts for Authorization, so in my DB I have the table AspNetUsers, and in the code the Login method calls: var result = await…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
910 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
616 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,760 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,208 questions
asked 2023-02-06T15:44:45.78+00:00
John Straumann 21 Reputation points
edited the question 2023-02-07T01:49:29.01+00:00
XuDong Peng-MSFT 4,576 Reputation points Microsoft Employee
0 answers

How do I get VS Installer to transform appsetting.json file as per SlowCheetah file transformations in an .net6 desktop app?

I am working with a C# Windows Forms App .NET 6.0. We have several different environments (dev, qat, etc) and I have created SlowCheetah transform files for each of them. When I compile in the various environments, the appsettings.json file which 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.
7,021 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
485 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,329 questions
asked 2023-02-06T22:32:31.06+00:00
Terry Carnes 0 Reputation points
edited the question 2023-02-07T01:43:08.32+00:00
Anna Xiu-MSFT 11,206 Reputation points Microsoft Employee
0 answers

There were deployment errors. Continue? (MAUI - Android Emulator Problem)

I am new to MAUI. when I run the android emulator this error popup. But with windows Machine, it works fine. I reinstall visual studio and it still shows this error. Please Help me to solve this problem or give alternative solutions.…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
910 questions
asked 2023-01-31T03:05:28.7+00:00
Chiranga Ranasinghe 0 Reputation points
commented 2023-02-07T01:41:10.4933333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,541 Reputation points Microsoft Employee
0 answers

Maui create release version of App

Ok I have an app which I would like to create a release version. I change to Release mode. I then build, took about 5 times before it worked. The errors mean absolutely nothing to me so I just kept on trying as this seems to be the way VS…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
910 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,448 questions
asked 2023-01-07T19:24:12.69+00:00
Lloyd Sheen 781 Reputation points
commented 2023-02-07T01:25:11.4766667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,541 Reputation points Microsoft Employee
0 answers

how to use blazor webassembly in razor pages?

how to use blazor webassembly component in razor pages? if I create Count in webassembly how to use it in razor pages? if I do not open that page do not load dll If I open that page then load it. /Pages/Count.cshtml with component Count If I do not open…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 questions
asked 2023-02-03T02:56:39.31+00:00
打玻璃 1,546 Reputation points
edited the question 2023-02-07T01:14:13.0666667+00:00
Zhi Lv - MSFT 18,886 Reputation points Microsoft Employee
0 answers

The type or namespace name 'Platform' does not exist in the namespace 'Microsoft.Maui.Graphics' (are you missing an assembly reference?)

Seriously, Do you even test before release? It works, then stops. Restart computer, and it works again. Given that Micro$oft no longer values the developer/engineers, you can bet the stock is going the way of Yahoo!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
910 questions
asked 2023-02-01T19:58:18.23+00:00
Mark Rooney 21 Reputation points
edited a comment 2023-02-07T01:14:00.2766667+00:00
Amy Peng-MSFT 251 Reputation points Microsoft Employee
0 answers

maping type error

im trying to create a get user by i method well not a user but an entity called branch and that entity has a foreign key called appuser now i want that when i call the get method it returns the entity branch as well as the data linked to it through the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 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.
153 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,208 questions
asked 2023-02-06T12:34:05.2233333+00:00
Asjad Butt 61 Reputation points
edited the question 2023-02-07T01:10:56.6566667+00:00
CosmogHong-MSFT 6,791 Reputation points Microsoft Employee
3 answers

add one to one and one to many relationship

Hi So a little weird but im trying to add a one to one and one to many relatioship between two entites lets say i have two entities 1 is branch 2 is AppUser now a branch can have a app user as the branch admin(done through roles not the elephant in the…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,208 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,599 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.
153 questions
asked 2023-02-06T10:14:32.9833333+00:00
Asjad Butt 61 Reputation points
edited the question 2023-02-07T01:09:16.0466667+00:00
CosmogHong-MSFT 6,791 Reputation points Microsoft Employee
1 answer

SideBar Nav Menu

Hello Friends. Has anyone ever used a side nav bar menu (kind of like a bootstrap Menu) in their .Net Maui windows app? Thanks !!!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
910 questions
asked 2023-02-01T21:41:39.3+00:00
Ronald Rex 531 Reputation points
commented 2023-02-07T01:08:42.2333333+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,821 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

.Net Maui, how to run method after page is shown?

Hi, I am trying to find a way to run a method after a contentpage is showing on the screen. OnAppearing() does not work as it fires before the page is actually loaded. Is there any way to do this without using a timer? It seems strange there is no built…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
910 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.
7,021 questions
asked 2023-02-05T22:31:22.9633333+00:00
Phunction 176 Reputation points
accepted 2023-02-07T01:07:46.8466667+00:00
Phunction 176 Reputation points