Microsoft Q&A

.NET

13,019 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

13,019 questions with .NET-related tags

Sort by: Updated
0 answers

what is the difference between constructor and properties

i mean in case we should declare a field as private is it better to declare a public property or using constructor? why? and if NO what is the usage of property? thank you very much :)

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,995 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
626 questions
asked 2023-02-04T08:18:06.5933333+00:00
mohammad hoseini 0 Reputation points
1 answer

Parameter is not valid error keeps randomly coming up every so many hours

Hello, I keep getting an error in my weather application and I don't really know what is causing it. It happens every so many hours and randomly occurs. My program is designed to run 24/7 without any user intervention. When I go to close my application…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,833 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
484 questions
asked 2020-12-29T19:24:06.537+00:00
Austin Althouse 21 Reputation points
answered 2023-02-04T08:15:56.8566667+00:00
Andrew Pepper 1 Reputation point
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.
626 questions
asked 2023-02-04T07:27:37.1966667+00:00
William Liu 121 Reputation points
edited the question 2023-02-04T07:33:52.9566667+00:00
William Liu 121 Reputation points
0 answers

How to program the OnBackButtonPressed Xamarin

Hello I implented the the Mediapicker in my xamarin page, but if I am in the menu for "Picking up Photo" I try to click on Back Button to turn back to the previous Mainpage but it doesnt work because the BackButton is not defined. Please…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,818 questions
asked 2023-02-02T11:14:10.31+00:00
Wanderer in der tiefen Nacht 0 Reputation points
edited a comment 2023-02-04T07:13:00.58+00:00
Wanderer in der tiefen Nacht 0 Reputation points
0 answers

Xamarin.Form make OutBound Call with SpeakerPhoneOn

It use to be that AudioManager allowed to turn SpeakerPhone On and Off during InBound and OutBound Call. I have posted several question for Android 10-13 with Xamarin each of which have fallen on deaf ears. WHY? Could it'd be that Google has sabotage the…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,818 questions
asked 2023-01-25T21:38:47.23+00:00
Universal Camera 286 Reputation points
commented 2023-02-04T02:52:15.5966667+00:00
Universal Camera 286 Reputation points
0 answers

Unable to bind the selected image file in Blazor file upload

"This question is updated with minimal sample as my old question doesnt give more info" I am learning blazor and c# fundas with a simple app.This app will allow you tobrowse all kind of files including images.As all kind files we can browse, i…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,581 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.
793 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,995 questions
asked 2023-02-04T02:38:07.29+00:00
RAMAN RAGAVAN 46 Reputation points
1 answer

Using transparent PNG for game development?

I'm thinking of developing a game using transparent PNGs but I have a couple issues: I can only get things to animate while they are moving. The images cut into each other leaving empty spots.

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,995 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
626 questions
asked 2023-02-03T17:52:22.6+00:00
Spamzilla 41 Reputation points
edited an answer 2023-02-04T02:16:17.2433333+00:00
Castorix31 65,791 Reputation points
0 answers

Xamarin iOS - development app is deployed on IPhone, but I cannot start it

I have an app in Xamarin that I want to test on a physical IPhone (normally I test it on Android). I'm connected to a Mac, the development certificate is working and everything is deployed to the point that the app is actually installed on the IPhone…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,818 questions
asked 2023-01-17T17:40:49.0266667+00:00
Ganesh Gebhard 366 Reputation points
commented 2023-02-04T01:13:06.0733333+00:00
Ganesh Gebhard 366 Reputation points
3 answers

How would I assign the members of one instance of a class to another instance of the same class in VB.NET?

How would I assign the members of one instance of a class to another instance of the same class in VB.NET? Both EETSettings and EETLightColors are istances of the same class in a VB.NET Windows Forms (.NET Framework) Application. EETSettings = New…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
626 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,833 questions
asked 2023-02-04T00:05:49.46+00:00
Marc Menzel 61 Reputation points
answered 2023-02-04T01:10:32.3633333+00:00
LesHay 5,766 Reputation points
1 answer

How to save login state when close browser?

when signed HttpContext.SignInAsync(claimsPrinciple); when I close the browser the cookie is not valid and I need login again. builder.Services.AddAuthentication("Cookie").AddCookie("Cookie", options => { options.Cookie.Name =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,581 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.
408 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
609 questions
asked 2023-02-04T00:18:52.4966667+00:00
打玻璃 1,526 Reputation points
answered 2023-02-04T00:58:16.5966667+00:00
AgaveJoe 17,131 Reputation points
2 answers

Parallax Background in web page - Setting div element background to transparent does not work for me

I don't know if I'm having a senior moment or not... I'm trynig to implement a parallax scrolling type of display in a web page. I have sourced the sample code from W3 Schools and adapted it, by adjusting margins basically (Please see -…

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.
408 questions
asked 2023-02-03T02:55:59.9233333+00:00
Zahir Khan 0 Reputation points
answered 2023-02-04T00:20:00.73+00:00
Zahir Khan 0 Reputation points
7 answers

How to implement custom elements in blazor 7 (Practical guide) ?

Hi everyone As you know, one of the new features of blazor 7 is custom elements. But there is not enough references & guides which demonstrate how to implement this. for example, I want to create custom element in my blazor server app, then consume…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,581 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.
793 questions
asked 2023-02-03T16:39:26.1333333+00:00
Hamed Vaziri 56 Reputation points
answered 2023-02-04T00:19:44.39+00:00
Bruce (SqlWork.com) 28,196 Reputation points
1 answer

Max size of System.IO.MemoryStream

Im trying to fetch a .bak file of 3GB size and upload to my blob storage using the SSH.NET package. I get an System.IO.IOException: stream was too long error! I cant find the max size of handeled streams for the System.IO.MemoryStream anywhere. Do…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,581 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,406 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,601 questions
asked 2023-02-02T10:46:56.6733333+00:00
August Asheim Birkeland 20 Reputation points
commented 2023-02-03T23:39:08.4133333+00:00
SaiKishor-MSFT 15,096 Reputation points Microsoft Employee
0 answers

Unable to add Token Providers when using multiple Identity Types

My application has two separate identity types. I created two types, as opposed to simply using roles, because the information I have to save about the types are pretty drastically different, and they use two separate applications that act on the same…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,818 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,581 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,995 questions
Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
346 questions
asked 2023-02-03T22:53:31.64+00:00
T-Rev 0 Reputation points
1 answer

4.6.1 migrating to .Net Core 7 – How do I resolve error MC1000- cannot find type System.Management.Instrumentation.InstrumentedAttribute in Assembly ..path \.nuget\packages\system.management\7.0.0\lib\net6.0\SystemManagement.dll – Microsoft.WinFx.Targets

I am migrating a .netFramework 4.6.1 application to core. I have been able to get rid of all of the build errors except this one: Error MC1000 Unknown build error, 'Could not find type 'System.Management.Instrumentation.InstrumentedAttribute' in…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
424 questions
Microsoft Build
Microsoft Build
A Microsoft platform for building applications with Visual Studio and .NET on Windows.
369 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,326 questions
asked 2022-11-29T01:11:01.337+00:00
Dozier, Fletcher [US] (DS) 1 Reputation point
answered 2023-02-03T21:47:03.9733333+00:00
Hardik Patel 0 Reputation points
1 answer

Aes.Create() crashing on Windows Server 2022

Has anyone encounter problems with Aes.Create() throwing an exception "Exception has been thrown by the target of an invocation".   I just migrated to a new server with Windows Server 2022 on it and all of a sudden I am getting this error…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
626 questions
asked 2023-01-24T15:11:46.67+00:00
Matt 0 Reputation points
commented 2023-02-03T21:45:38.2066667+00:00
Viorel 82,906 Reputation points
2 answers

X509Certificate Client Authentication

Hello guys, I have the following code that was working perfectly fine for 3 years already. ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 …

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.
408 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,995 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
238 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,214 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
asked 2023-02-02T14:44:17.87+00:00
Kuler Master 141 Reputation points
commented 2023-02-03T21:24:26.54+00:00
Kuler Master 141 Reputation points
1 answer One of the answers was accepted by the question author.

[MacOS] Console Application - Issue recognizing the file Path

Dear community, I have this issue: I deployed a console application (C# - Visual Studio - Unix Executable File). As you will see in the following screenshots, the issue is that running by double-click or using the full path doesn't allow the Terminal to…

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,995 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
626 questions
asked 2023-02-03T13:15:24.28+00:00
Juan Gomez 0 Reputation points
commented 2023-02-03T21:18:39.3133333+00:00
Juan Gomez 0 Reputation points
1 answer

Edmx codegenerator for legacy project

I have been assigned a task required to use VS 2012 edmx generator. Therefore, I have to get a license for VS 2012 although we bought and use VS 2022.   I am looking for a way that I do not have to install VS 2012. But the code won’t generate like VS…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
218 questions
asked 2023-02-01T21:25:28.9633333+00:00
EunMin Lee 0 Reputation points
commented 2023-02-03T21:16:48.1733333+00:00
EunMin Lee 0 Reputation points
1 answer

The current .NET security policy prohibits C:\Users\...\File.xlsx from loading custom macros.

I am working on a project in Visual Studio Community 2022. The project is an Excel VSTO Workbook using Visual Basic (Target framework is .NET Framework 4.8). Up until yesterday everything was working fine, I could run and debug my project whenever I…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
626 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
1,970 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,436 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
80 questions
asked 2023-01-19T01:59:19.6166667+00:00
Ricardo Freccero 1 Reputation point
answered 2023-02-03T19:42:40.97+00:00
Abraham Valencia 0 Reputation points