Microsoft Q&A

.NET

13,060 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

13,060 questions with .NET-related tags

Sort by: Updated
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,596 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,416 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,610 questions
asked 2023-02-02T10:46:56.6733333+00:00
August Asheim Birkeland 20 Reputation points
commented 2023-02-06T17:45:55.14+00:00
SaiKishor-MSFT 15,096 Reputation points Microsoft Employee
0 answers

How to call the server map path filename that generated randomly

This is a C# code for a Web Form page named "upload.aspx" which allows the user to upload a PDF file and store it in the server. The file uploaded must be a PDF file, and all the text boxes must be filled before submission. The file name 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,012 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,207 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.
410 questions
asked 2023-02-06T17:34:11.35+00:00
Sunny 0 Reputation points
edited the question 2023-02-06T17:36:12.96+00:00
Sunny 0 Reputation points
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,596 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
617 questions
asked 2023-02-06T03:09:17.0033333+00:00
Anjali Agarwal 121 Reputation points
answered 2023-02-06T17:35:04.64+00:00
Michael Taylor 38,111 Reputation points
0 answers

EF Core 7 not using my compound keys and throws error

Banging my head on this one. I'm trying to upgrade to Entity Framework Core 7. My class has a YearTerm and a CourseId. I can't get EF to use my key annotations or fluent API to identify my keys. I've tried the line below as in the Microsoft documents.…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
426 questions
asked 2023-02-06T17:32:43.0366667+00:00
Chris 0 Reputation points
2 answers One of the answers was accepted by the question author.

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,449 questions
Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
219 questions
asked 2023-02-01T21:25:28.9633333+00:00
EunMin Lee 0 Reputation points
accepted 2023-02-06T17:30:43.55+00:00
EunMin Lee 0 Reputation points
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.
636 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
commented 2023-02-06T17:24:03.78+00:00
Nathan Sokalski 3,976 Reputation points
0 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,207 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,596 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.
8,576 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
commented 2023-02-06T17:17:46.3166667+00:00
Asjad Butt 61 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…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
617 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,207 questions
asked 2023-02-06T15:44:45.78+00:00
John Straumann 21 Reputation points
commented 2023-02-06T17:15:49.9666667+00:00
Richard Millington 0 Reputation points
1 answer

Manage multirepo projects

Hello, I have to manage a multirepo project, i have three repositories (A,B,C) of .net projects and Im using visual studio 2022 latest release, my doubts are: Have I to have only one visual studio solution file? If yes where i have to store it? (in…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,596 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,449 questions
asked 2023-02-06T09:33:21.4433333+00:00
first100 61 Reputation points
answered 2023-02-06T16:45:06.2666667+00:00
Bruce (SqlWork.com) 28,276 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.
7,012 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
636 questions
asked 2023-02-03T17:52:22.6+00:00
Spamzilla 41 Reputation points
commented 2023-02-06T16:43:02.0466667+00:00
Spamzilla 41 Reputation points
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.
908 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,449 questions
asked 2023-01-07T19:24:12.69+00:00
Lloyd Sheen 781 Reputation points
commented 2023-02-06T16:40:47.07+00:00
Lloyd Sheen 781 Reputation points
1 answer

cookie can not read after downgrade from 7.0 to 6.0?

I am using .net 7.0 and after I downgrade to .net 6.0 I can not use HttpContext.User it is not authenticated. in F12 Cookie I can see the Cookie I have set but I can not read it why?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,596 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
617 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,207 questions
asked 2023-02-06T00:49:27.5+00:00
打玻璃 1,546 Reputation points
answered 2023-02-06T16:31:22.6633333+00:00
Bruce (SqlWork.com) 28,276 Reputation points
2 answers

Create client credential for Azure AD's App registration

I created a new ASP.NET Core MVC 6.0 web application >> and i define it to use Azure AD for authentication, as follow:- then i were asked to create owned application, so i created one named "ad" as follow:- and inside my application's…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,596 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,743 questions
asked 2023-02-03T15:04:51.97+00:00
john john 681 Reputation points
answered 2023-02-06T16:27:16.8866667+00:00
Bruce (SqlWork.com) 28,276 Reputation points
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…

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,012 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
617 questions
asked 2023-02-06T07:30:50.62+00:00
winanjaya 41 Reputation points
answered 2023-02-06T16:16:39.66+00:00
Bruce (SqlWork.com) 28,276 Reputation points
1 answer

.NET error in Event Viewer, "filenotfoundexception" "typeinitializationexception"

I'm at the end of my rope here. Details: Using Microsoft Visual Studio Installer Projects Windows 10 is the target system, x86 is the build target, x64 is the windows machine. I've built and deployed this installer with my projects into this machine…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
636 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
6,021 questions
asked 2023-01-17T18:30:35.1266667+00:00
nope no 1 Reputation point
commented 2023-02-06T15:56:24.4966667+00:00
Michael Taylor 38,111 Reputation points
1 answer

I found an error in the Roslyn API documentation under the Chinese page

In the blank space below the English page, it appears as a duplicate paragraph in the Chinese page I don't know if other pages have similar errors, but I think the person in charge should check it out

.NET
.NET
Microsoft Technologies based on the .NET software framework.
636 questions
asked 2023-02-06T15:17:17.33+00:00
sigger 26 Reputation points
edited a comment 2023-02-06T15:30:05.48+00:00
Reza Aghaei 3,841 Reputation points Microsoft MVP
0 answers

Azure Service Bus and big process, misbehave

Hello, we have a one IHosted service and in that we implemented service bus receiver mode. In that we set 5 min Message lock duration, but some time process need more time in that scenario but after 5 min again same message picked and again start the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,596 questions
Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
339 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,012 questions
asked 2023-02-02T07:49:03.6966667+00:00
Pritesh Patel 0 Reputation points
edited the question 2023-02-06T15:08:59.2066667+00:00
MuthuKumaran Murugaachari 6,086 Reputation points Microsoft Employee
1 answer

How to Change the Default .NET Logo and Splash Screen on an iPhone iOS .NET MAUI

Does anyone know why the app icon and splash screen will not change in debug mode on my Local Device, iPhone 12 Max pro? I do not have an Android phone to test with but the icon and splash screen do change on the emulator. This is how the .csproj is…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
908 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
636 questions
asked 2023-02-06T03:55:53.9666667+00:00
DOTNETVIC 0 Reputation points
commented 2023-02-06T15:04:38.11+00:00
DOTNETVIC 0 Reputation points
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
answered 2023-02-06T14:51:04.0733333+00:00
cristopheB 476 Reputation points
0 answers

Help with Smart App Control issues regarding .NET Runtime Optimization Service and Windows Subsystem for Linux (WSL)

I am having problems with the new Smart App Control feature in Windows 11 Home (windows build 22621). After activating some Windows Features, Smart App started popping up with warnings that the .NET Runtime Optimization Service has been blocked and has…

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,144 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
3,554 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
958 questions
asked 2023-02-06T14:25:34.6433333+00:00
Tom 0 Reputation points