Microsoft Q&A

.NET

15,125 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

15,125 questions with .NET-related tags

Sort by: Updated
0 answers

Xamarin to MAUI: When setting <UseMaui>true</UseMaui> in csproj, my xaml.cs files are removed

Within the csproj file, when setting the tag <UseMaui>true</UseMaui>, all xaml.cs files that were used with Xamarin are removed. When setting <UseMaui>false</UseMaui> all xaml.cs files are returned. This happens when using the…

XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
643 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,376 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,111 questions
asked 2023-05-24T15:02:51.5066667+00:00
Franklin 6 Reputation points
edited the question 2023-05-25T04:49:30.65+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 19,891 Reputation points Microsoft Vendor
3 answers

All events are executed 2 times.

I have an Aspx project with the latest version of VS and .net 4.8.1 on Windows 11. The problem is that in Global.asax the same events are being executed 2 times starting with Application_Start() Session_Start() index.aspx Session_End() Application_End()…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,468 questions
asked 2023-05-15T05:29:44.7533333+00:00
zequion 1 Reputation point
edited a comment 2023-05-25T04:45:17.5233333+00:00
XuDong Peng-MSFT 4,996 Reputation points Microsoft Vendor
1 answer

.net6 project use .net7 compile error no .net7.0-...... targetframeworks

Hi I try any methods, it still compile error delete x86 .net7 sdk delete obj dotnet restore target set net7.0 <TargetFrameworks>net7.0-maccatalyst;net7.0-ios;net7.0-android33.0</TargetFrameworks> <TargetFrameworks…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,376 questions
asked 2023-05-23T15:56:52.0533333+00:00
Fei Xu 200 Reputation points
commented 2023-05-25T04:37:49.8266667+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 19,891 Reputation points Microsoft Vendor
0 answers

provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

I get the error message when I try to connect to the SQL Server 2005 Database from VisualStudio 2022 and .Net 6 Project (winform). my project is winform with .net 6 .when i want to connect to remote server that is sql 2005 ,i get error : 26 - Error…

.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
503 questions
asked 2023-05-24T16:18:10.3566667+00:00
Mohsen Mohammadi 0 Reputation points
commented 2023-05-25T04:18:45.27+00:00
Jiale Xue - MSFT 3,531 Reputation points Microsoft Vendor
1 answer

How to generate a test or development build of an windows desktop application using c#

I have modified my Windows application developed using c# to open through a URL now I want to share this build with my client for testing so how to create a test build in the visual studio can anyone suggest me an approach ?? Thanks in advance. …

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,455 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,128 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,111 questions
asked 2023-05-22T13:40:45.9266667+00:00
Dineshkumar.S 346 Reputation points
commented 2023-05-25T04:15:19.34+00:00
Dineshkumar.S 346 Reputation points
0 answers

The connection is closed without waiting for a timeout.

I have installed Windows 11 and use the latest version of VS. When executing the aspx project, as soon as session_start() is finished, session_end() and application_end() are executed and the connection is closed. If I click anywhere on the web,…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,468 questions
asked 2023-05-04T04:24:32.0033333+00:00
zequion 1 Reputation point
commented 2023-05-25T03:37:50.4033333+00:00
zequion 1 Reputation point
1 answer

.net Maui Publishing Errors

I cannot get Visual Studio to publish my .net maui application correctly. When I look at the WindowsApp.Manifest the information appears to match the information that the partner center is expecting to see, however, when I upload the app to the partner…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,376 questions
asked 2023-05-23T15:18:38.2733333+00:00
uslimey67 0 Reputation points
commented 2023-05-25T03:28:07.4133333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 19,891 Reputation points Microsoft Vendor
0 answers

Constantly getting "System.InvalidOperationException: No service for type 'Microsoft.AspNetCore.Components.WebAssembly.Authentication.BaseAddressAuthorizationMessageHandler' has been registered." exception in .NET 6 Blazor WASM hosted app.

I've created a hosted Blazor WASM app that uses Azure AD for authentication and authorization. I am able to login to Azure AD successfully. After I login, I try to navigate to a page that has an API call, and get the error described in the stack trace…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
963 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,110 questions
asked 2023-05-24T14:14:10.83+00:00
Greg Rairdon 0 Reputation points
commented 2023-05-25T03:26:47.4066667+00:00
Qing Guo - MSFT 391 Reputation points Microsoft Vendor
0 answers

Moving Website from .net 4.8 to .net 6 - mod rewrite of redirection of aspx pages to cshtml

Moving Website from .net 4.8 to .net 6 - I have webpages with next to no c# written for .net 4.8 and the webpages end in .aspx I want move to .net 6.0 with Blazor and the webpages will end in cshtml. how do I redirect to the new cshtml pages using a…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,128 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,468 questions
asked 2023-05-24T18:07:20.55+00:00
Grant Wilson 0 Reputation points
edited the question 2023-05-25T03:12:24.13+00:00
Jiale Xue - MSFT 3,531 Reputation points Microsoft Vendor
1 answer

ContactItem.Move Interop method on Exchange server triggers hard deletion of contact in Outlook

We have a simple tool built in C# which we use to identify duplicated contacts in Outlook and move them to a subfolder. The tool worked perfectly fine until January 2023, but since then every time we use the tool, the contacts which are moved to the…

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
464 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
978 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,128 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,111 questions
asked 2023-05-24T13:28:58.4633333+00:00
Laurentiu Lungu 0 Reputation points
answered 2023-05-25T02:51:55.45+00:00
Shaofan Lv-MSFT 310 Reputation points Microsoft Vendor
2 answers

How do i protect Web API

Hi I'm taking some training courses on Azure and Web API. I need to protect my Web Api which has been built on Visual Studio 2022 with all the latest versions, updates installed and selected (except i didnt select .Net 7). I saw these…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,575 questions
Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
446 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.
205 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,110 questions
asked 2023-05-02T15:38:45.8333333+00:00
Keith Viking 20 Reputation points
edited the question 2023-05-25T02:50:40.8833333+00:00
Jack J Jun 23,431 Reputation points Microsoft Vendor
2 answers

Radio button and date's problem my ASP.NET

Friends, first of all hello. I'm designing a simple form site. But I'm getting an error. Texts are writing to the database, but the radio button and date does not write the error explodes. I left the whole code for you to review. I need help

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,110 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.
9,691 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,468 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
843 questions
asked 2023-05-11T14:22:07.8233333+00:00
Harun Ergün 220 Reputation points
edited the question 2023-05-25T02:48:10.3833333+00:00
Jack J Jun 23,431 Reputation points Microsoft Vendor
1 answer

What does this mean? How can I fix it?

[InvalidOperationException: Sequence contains no elements] System.Linq.Enumerable.Single(IEnumerable`1 source) +317 Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin.Start() +78 …

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,468 questions
asked 2023-05-15T15:00:27.2633333+00:00
Davi Leao Gomes 20 Reputation points
edited the question 2023-05-25T02:46:12.04+00:00
Jack J Jun 23,431 Reputation points Microsoft Vendor
0 answers

BİR JAVASCRİPT DOSYASI İÇERİSİNDE FARKLI BİR JAVASCRIPT DOSYASINA AİT FONKSİYONU ÇAĞIRMA

Merhaba , Bir javascript dosyası içerisinden farklı bir javascript dosyasına ait fonksiyonu kullanmak istiyorum. Yardımcı olursanız sevinirim.

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
572 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
843 questions
asked 2023-05-18T14:18:16.7866667+00:00
Burhan AYDIN 0 Reputation points
edited the question 2023-05-25T02:44:09.8666667+00:00
Jack J Jun 23,431 Reputation points Microsoft Vendor
0 answers

In my Xamarin app, I have a webview. The website I am running in the webview will send messages to the webview. How do I capture the events

How does my Xamarin app that is consuming a WebView receive messages from the html running in the WebView

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,999 questions
asked 2023-05-24T20:57:05.1333333+00:00
tbelvin 21 Reputation points
commented 2023-05-25T02:38:53.9366667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 16,216 Reputation points Microsoft Vendor
0 answers

how to reduce the size of an image for uploAD

I used to be able to do this * file = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions { AllowCropping = false, SaveMetaData =…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,999 questions
asked 2023-05-22T23:55:52.0466667+00:00
rick ruhl 41 Reputation points
commented 2023-05-25T02:35:23.0433333+00:00
rick ruhl 41 Reputation points
1 answer

Book about Core CLR

Hi Could you please recommend any book for Core CLR ? Something like CLR via C# (Jeffrey Richter), but for actual versions of .net

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,128 questions
asked 2023-05-24T19:55:02.2866667+00:00
Serge 0 Reputation points
answered 2023-05-25T02:24:29.2966667+00:00
Jack J Jun 23,431 Reputation points Microsoft Vendor
1 answer

DIV color problem

Hello I have this html style and body code: .btn{ padding: 10px 20px; -webkit-border-radius:3px; border-radius:3px; width:180px; margin: 5px auto; } <div class="btn"…

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.
545 questions
asked 2023-05-24T17:05:59.2866667+00:00
Peter Volz 160 Reputation points
answered 2023-05-25T02:16:56.1633333+00:00
Lan Huang-MSFT 14,751 Reputation points Microsoft Vendor
1 answer

about use Lambda expression in Property

Here's using Lambda in Property, public int MyProperty { get => myVar; set => myVar = value; } but if I want multiple statements in seter or getter, hot to do that?or in this case only can…

.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
503 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,128 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,357 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,110 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,111 questions
asked 2023-05-20T03:55:32.0433333+00:00
兰树豪 301 Reputation points
commented 2023-05-25T01:38:02.3366667+00:00
Hui Liu-MSFT 17,216 Reputation points Microsoft Vendor
0 answers

Local IIS without local admin privileges

Is it possible to run local IIS (on the developer's machine) without being a local admin? when the latest security measures were applied we all lost local admin privileges.

Internet Information Services
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.
545 questions
asked 2023-05-24T13:16:36.4666667+00:00
Lukic, Dejan 0 Reputation points
edited the question 2023-05-25T01:30:19.1033333+00:00
Sam Wu-MSFT 5,926 Reputation points Microsoft Vendor