Microsoft Q&A

ASP.NET Core

2,565 questions

A set of technologies in the .NET Framework for building web applications and XML web services.

Browse all .NET tags

2,565 questions with ASP.NET Core tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

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,565 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,980 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-01-31T01:42:14.5866667+00:00
Anjali Agarwal 101 Reputation points
accepted 2023-02-03T04:58:37.07+00:00
Anjali Agarwal 101 Reputation points
0 answers

embedding a pdf file in my chrome browser

I am trying to embed a pdf file on my web page. In order to achieve this, I have the following code in my controller: public IActionResult Index() { string path = Path.Combine(_environment.WebRootPath, "packageFiles"); …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-03T04:57:40.42+00:00
Anjali Agarwal 101 Reputation points
0 answers

IEnum object True for All

Hi friends, I wonder if there is a way to use TrueForAll for IEnumerable<OrderDetail>? I am trying to check if all of the status = 1 or not. How can I check if all statuses in details are 1 or not? Thank you. var details =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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,980 questions
asked 2023-02-03T04:39:43.0233333+00:00
Cenk 666 Reputation points
edited the question 2023-02-03T04:48:32.0533333+00:00
Cenk 666 Reputation points
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,565 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 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.
405 questions
asked 2023-02-03T02:56:39.31+00:00
打玻璃 1,526 Reputation points
1 answer

Add-Migration CreateIdentitySchema

Having difficulty with the Add-Migration CreateIdentitySchema step in the tutorial. Any help would be appreciated: Tutorial:…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-02T19:03:35.49+00:00
Dean Everhart 401 Reputation points
answered 2023-02-03T00:53:01.0933333+00:00
SurferOnWww 636 Reputation points
0 answers

String interpolation using $ throws System.NullReferenceException on .Net7

We have in my team just upgraded to .net 7 from 6, but we have run into a issues with string interpolation using $"Text {sample}" We are all developing on Intel Macbook Pro's using both Visual Studio or JetBrains Rider. But since the upgrade…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
614 questions
asked 2023-02-02T23:08:22.8133333+00:00
Morten Starck 0 Reputation points
edited the question 2023-02-02T23:09:04.55+00:00
Morten Starck 0 Reputation points
0 answers

How to query the device twin graph using the built-in `LastUpdatedOn` property from the BasicDigitalTwin?

The BasicDigitalTwin holds a built-in property LastUpdatedOn. As a developer, I want to run a query to find all the stale or fresh twins, example: SELECT * FROM DIGITALTWINS WHERE LastUpdatedOn > '{yesterday}' This query is syntactically correct but…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
122 questions
asked 2023-02-02T22:50:47.77+00:00
Uriel Kluk 21 Reputation points
1 answer

Layout design for mobile and desktop (width, height and density)

I want to display data tables in an application on mobile as well as in the web browser or on the desktop and I want it to look appropriate. My idea is to show or hide the table columns depending on the width of the screen ( Note: I can open the row…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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.
790 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 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,980 questions
asked 2023-02-02T19:10:53.21+00:00
perfect code 161 Reputation points
edited an answer 2023-02-02T21:19:21.86+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,565 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,403 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
edited an answer 2023-02-02T21:06:59.63+00:00
SaiKishor-MSFT 15,086 Reputation points Microsoft Employee
1 answer

error when I tried to findBy string in API

Hello, currently, I'm learning Swagger, when I tried to create find by username ,I got the below error [HttpGet] [Route("{fullname:string}")] public async Task<IActionResult> signIn([FromRoute] string…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
asked 2023-02-02T20:42:16.4033333+00:00
ahmed omar 61 Reputation points
answered 2023-02-02T20:49:48.9466667+00:00
Michael Taylor 37,946 Reputation points
1 answer

Best structure for a zero downtime simple ASP .NET / DB web app

This will be a pretty simple app with a lot being read from the DB, display on the web page; submit a web page, write to the DB. With some calls to some standard ML services as part of a query on the DB and evaluate what is submitted. It will be a…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
asked 2023-02-02T18:02:52.3366667+00:00
David Thielen 401 Reputation points
commented 2023-02-02T20:04:06.7633333+00:00
David Thielen 401 Reputation points
2 answers One of the answers was accepted by the question author.

Auth cookie is deleted by the browser when it closes

I have a strange problem. When I close my browser (whether Chrome or MS Edge), my authentication cookie is deleted. Consequently, the next time I start the browser, I have to log in again. My controller looks like this: ClaimsIdentity claimsIdentity =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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.
790 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,980 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-01-31T19:34:06.25+00:00
perfect code 161 Reputation points
commented 2023-02-02T18:52:06.9266667+00:00
perfect code 161 Reputation points
1 answer

BackgroundService - Is it possible to set parameter value?

Hi, I have a background service. I wonder if it is possible to set a parameter to this service from the Blazor Server application or in any other way? Thank you in advance.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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,980 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.
790 questions
asked 2023-02-02T16:43:45.4+00:00
Cenk 666 Reputation points
answered 2023-02-02T18:45:27.95+00:00
Bruce (SqlWork.com) 28,196 Reputation points
19 answers

JsonConvert System.ArgumentNullException : 'Value cannot be null. Arg_ParamName_Name'

Hi, I tried to do the tree view structure. The code behind is public string TreeViewJSON { get; set; } public void OnGet() { List<TreeViewNode> nodes = new List<TreeViewNode>(); …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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,980 questions
asked 2022-07-12T14:11:32.053+00:00
sblb 831 Reputation points
answered 2023-02-02T15:23:28.7833333+00:00
无敌霸王龙 0 Reputation points
2 answers One of the answers was accepted by the question author.

Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design Error 6.0 v 7.0

Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design renders following error message: PM> install-package microsoft.VisualStudio.Web.CodeGeneration.Design Restoring packages for…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-01T18:59:18.8533333+00:00
Dean Everhart 401 Reputation points
commented 2023-02-02T13:15:56.79+00:00
Dean Everhart 401 Reputation points
1 answer

EF Core 6 - Adding records based on a condition

Hi friends, In my Blazor server application, I am inserting BulkPurchaseRequest records into DB as follows. public class BulkPurchaseRequestsRepository : IBulkPurchaseRequestsRepository { private readonly OyunPalasContext _oyunPalasContext; …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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.
790 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
424 questions
asked 2023-02-01T17:33:09.4066667+00:00
Cenk 666 Reputation points
commented 2023-02-02T12:55:30.4066667+00:00
Cenk 666 Reputation points
0 answers

HTTPStatusCode 404 in production only, why?

Hi, What's wrong with my code below, I have tried it in debug mode and got no 404, but if I run it in production (Linux CentOS 8), it fails with 404 (in my case it always fail on pageNo == 2 (there are actually have 20 pages) List<Task> tasks =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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,980 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-02T01:50:28.88+00:00
winanjaya 41 Reputation points
edited a comment 2023-02-02T09:50:31.2766667+00:00
Viorel 82,741 Reputation points
1 answer

I can't use class on layered architecture

I'm working on a web.api for library otomation project. I'm using layered architecture on project. a485553e-89a6-4fa9-8dd5-1c40de6d40e2.jpg image is my architecture. I couldn't access User.cs class on DataAccess layer. I defined with "usign"…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
424 questions
asked 2023-02-02T07:05:02.2466667+00:00
ömercan künye 0 Reputation points
commented 2023-02-02T09:34:24.4166667+00:00
Viorel 82,741 Reputation points
1 answer

sslPort in launchsetting.json only works with port 44308 - ASPNETCORE MVC

Below is my launchsettings.json file. When I define sslPort 44308. I am able to browse https://localhost:44308. But if I define any other port let's say "44309". It is not working and browser throwing error stating "This site can't be…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
asked 2023-02-01T17:45:37.97+00:00
Amit Rawat 526 Reputation points
commented 2023-02-02T09:16:17.74+00:00
Amit Rawat 526 Reputation points
0 answers

.net upgrade assistant added net7.0-windows for asp.net MVC webapplication during migration

When I used .net upgrade assistant tool convert my webapplication with asp.net MVC with .cshtml views of .net framework 4.8 to migrate to .net 7 then the tool included .net 7-windows as the target framework. this is the same case for projects of type…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
asked 2023-01-31T05:24:17.76+00:00
Tanv 0 Reputation points
edited a comment 2023-02-02T08:15:09.3533333+00:00
Brando Zhang-MSFT 1,916 Reputation points Microsoft Employee