Microsoft Q&A

.NET

12,933 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

3,187 questions with .NET-related tags

Sort by: Updated
0 answers

Linq query and violation of inserting null in database

Hello All, I have the following two model classes: public partial class EmployeeInfo { public int EmployeeInfoId { get; set; } public string LastName { get; set; } = null!; [DisplayName("First Name")] public string FirstName { get; set; } =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,545 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,950 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
592 questions
asked 2023-01-31T01:42:14.5866667+00:00
Anjali Agarwal 81 Reputation points
commented 2023-02-01T04:14:29.0066667+00:00
Anjali Agarwal 81 Reputation points
0 answers

Entity Framework 框架问题

dbcontext不同的实例,savechanges被互相影响怎么回事

.NET
.NET
Microsoft Technologies based on the .NET software framework.
615 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
421 questions
asked 2023-01-31T08:38:53.5766667+00:00
赐 张 0 Reputation points
commented 2023-02-01T03:23:52.2166667+00:00
Jack J Jun 19,061 Reputation points Microsoft Employee
0 answers

Unable to Delete document using One drive API in C#

I am unable to delete a document by using one drive API in ASP.Net(c#) if the document is open. How to check the document is already open by using one drive API. Please help.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,189 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
49 questions
Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
302 questions
asked 2023-01-31T19:35:29.9833333+00:00
Pradyut Sinha 11 Reputation points
commented 2023-02-01T03:22:47.09+00:00
Zehui Yao_MSFT 3,431 Reputation points Microsoft Employee
0 answers

iOS application getting crashed "Could not set up parent class, due to: Invalid generic instantiation"

In a .Net MAUI project app is getting crashed when I am deploying it on device. below is the exception I am getting Any idea why this is happening always?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
890 questions
asked 2023-01-31T09:28:45.81+00:00
Suyash Sadh 0 Reputation points
commented 2023-02-01T03:03:42.0433333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 15,666 Reputation points Microsoft Employee
0 answers

I'm getting code first approach validation error can you help me

I add error massege and I update database with (datanase-update -Force).but not working error massege. why ?

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
592 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,189 questions
asked 2023-01-31T13:51:55.46+00:00
Harun Ergün 100 Reputation points
edited the question 2023-02-01T02:09:14.5433333+00:00
XuDong Peng-MSFT 4,576 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.…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,809 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
890 questions
asked 2023-01-31T03:05:28.7+00:00
Chiranga Ranasinghe 0 Reputation points
commented 2023-02-01T02:03:14.1033333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,141 Reputation points Microsoft Employee
0 answers

BackgroundService Serilog how to email?

Hi, In my background service, I would like to send error logs. Although there is an error, the email sink does not work. The error is being written to the file and mssqlserver successfully. Can you please share your experiences? Here is the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,545 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,950 questions
asked 2023-01-31T14:40:53.22+00:00
Cenk 666 Reputation points
commented 2023-02-01T01:36:07.2566667+00:00
Karen Payne MVP 29,236 Reputation points Microsoft MVP
0 answers

Java.Lang.IllegalArgumentException Message=No view found for id 0x2 (unknown) for fragment ShellItemRenderer{8ff985} (8d59f552-5e3e-48c3-a91e-e50041b57719 id=0x2)

I am using Version VS 17.5.0 Preview 2.017.5.0 Preview 2.0. In this when I debug it with my mobile it gives me error Java.Lang.IllegalArgumentException Message=No view found for id 0x2 (unknown) for fragment ShellItemRenderer{8ff985}…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
890 questions
asked 2023-01-30T08:42:52.66+00:00
anil kumar 51 Reputation points
commented 2023-02-01T01:34:09.8666667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,141 Reputation points Microsoft Employee
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.
400 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,827 questions
asked 2023-01-30T04:06:30.6633333+00:00
Simflex 81 Reputation points
edited a comment 2023-01-31T21:53:03.81+00:00
Simflex 81 Reputation points
0 answers

iText7 PDF generation help needed

Hello friends, In my Blazor Server application, I am generating a PDF like this. But requirements changed, I need to insert a table and logo like this sample. How can I manage it? InkedScreenshot 2023-01-31 at 19-47-25 Purchase Order -…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,545 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,950 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.
785 questions
asked 2023-01-31T17:32:57.46+00:00
Cenk 666 Reputation points
0 answers

How to find pc is hacked or not

i nee to know my pc is haced or not

.NET F#
.NET F#
.NET: Microsoft Technologies based on the .NET software framework.F#: A strongly typed, multi-paradigm programming language developed by the F# Software Foundation, Microsoft, and open contributors.
15 questions
asked 2023-01-31T16:58:00.2033333+00:00
Abhinavkrishna V s 0 Reputation points
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…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
615 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,950 questions
asked 2023-01-30T23:11:11.52+00:00
Andy Reynolds 0 Reputation points
commented 2023-01-31T15:44:28.5033333+00:00
Andy Reynolds 0 Reputation points
0 answers

how to fix AutoFixture.ObjectCreationExceptionWithPath: AutoFixture was unable to create an instance from AutoMapper.IMapper

i have below code for xunit testing in asp .net core using AutoFixture.Xunit2;using AutoMapper;using FluentAssertions;using Moq;using MyRBV.AppService.Cars;using MyRBV.AppService.Contract.Cars;using MyRBV.DomainService.Cruds;using…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,545 questions
asked 2023-01-31T15:28:01.8366667+00:00
Mehran Kordavani 0 Reputation points
0 answers

How to convert existing solution to use Shell

I have a solution that does not use Shell. I would like to change it so that it uses shell. I created a new solution and copied the AppShell.xaml and .cs. I changed the namespace to the correct namespace. I then changed the app.xaml.cs to: …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
890 questions
asked 2023-01-31T14:51:43.6833333+00:00
Lloyd Sheen 756 Reputation points
0 answers

What is projectname.iOS file which is huge in size created using Xamarin ios shown inside payload

When we create IPA in Xamarin using visula studio and we check the contents of the IPA using below method. Create IPA. Change the extension of IPA from .ipa to .zip Payload folder will get created In the Payload folder Projectname.iOS file will be…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,809 questions
asked 2023-01-31T12:58:42.0533333+00:00
Jadhav, Snehal [MN035] 0 Reputation points
0 answers

Get an ILogger instance for App Insights from ServiceCollection in a WebForms .NET Framework application

We want to get an ILogger instance so that it can be passed to other library. We tried below, but the ILogger instance does not log into Application Insights. It logs into Event Viewer successfully. We have added the necessary packages i.e.…

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.
400 questions
asked 2023-01-31T12:10:20.45+00:00
Wadhwani, Jatin 0 Reputation points
0 answers

Why do I get a resource not found when disabling Hot Reload

If I disable hot reload I get a Gray950 resouce not found. This is such an indication of the major problems that VS 2022 has. There is no relationship between the two. The only reference that I could find about Gray950 is that it is a resource used in…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
890 questions
asked 2023-01-23T22:03:46.8+00:00
Lloyd Sheen 756 Reputation points
edited the question 2023-01-31T11:57:00.16+00:00
Anna Xiu-MSFT 11,021 Reputation points Microsoft Employee
0 answers

HttpClient fails to establish SSL connection with server configured with RSA 4096 key.

I am using .net framework 4.7 in WinForms application and using HttpClient for SSO login, When I call server url with using HttpClient then initial handshaking fails with following error. The request was aborted: Could not create SSL/TLS secure…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
615 questions
asked 2023-01-30T07:53:05.98+00:00
Rajeev Pradhan 0 Reputation points
edited a comment 2023-01-31T11:34:54.9033333+00:00
Rajeev Pradhan 0 Reputation points
0 answers

Why I can't Fake-Mock "System" in .net core 6.0(VS Enterprise 2022)

Why I can't Fake-Mock "System" in .net core 6.0(VS Enterprise 2022), I don't know what happened?   I was trying to use "using System.Fakes; " , But it alert "missing an assemly reference" after following …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,545 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,412 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
251 questions
asked 2023-01-31T10:06:39.3233333+00:00
Angelina Jolie 0 Reputation points
0 answers

Net Maui when I clicked ( 3 times ) the button multiple page ( 3 times ) comes that has to be only one page..

Net Maui when I clicked ( 3 times ) the button multiple page ( 3 times ) comes that has to be only one page.. any solution ? Thanks

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
890 questions
asked 2023-01-19T02:40:42.8666667+00:00
Sami 101 Reputation points
commented 2023-01-31T09:42:12.5566667+00:00
Sami 101 Reputation points