Microsoft Q&A

.NET

13,784 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

13,784 questions with .NET-related tags

Sort by: Updated
2 answers

Cost of hosting ASP.NET Core Blazor Server App Vs MVC

To host a Blazor Server App, an Azure Service that can handle SignalR is needed. To host a MVC App, serverless or app service is only needed. Out of these two, which is more cheaper to host for an application that has 10,000 users and 500 users active…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
858 questions
asked 2021-03-03T12:25:47.76+00:00
126GreatThings 1 Reputation point
answered 2023-03-14T23:38:04.4+00:00
Bruce (SqlWork.com) 30,301 Reputation points
1 answer

When is a .cshtml file appropriate in Blazor (server side)?

The sample app created by Visual Studio for a server side Blazor creates _Host.cshtml and Error.cshtml. Everything else is a .razor file. So... when, if ever, should we be creating a .cshtml file? And why are these two files cshtml instead of…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
858 questions
asked 2023-03-14T17:49:06.0366667+00:00
David Thielen 591 Reputation points
answered 2023-03-14T23:16:24.9633333+00:00
Bruce (SqlWork.com) 30,301 Reputation points
3 answers

Is there a way to say an entry is unique across 2 column values?

My question is in the context of Entity Frameworks talking to SQL Database. I have a class as follows: public class County { public int Id { get; set; } public string Name { get; set; } public int StateId { get; set; } …

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,961 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
466 questions
asked 2023-03-10T00:03:02.3+00:00
David Thielen 591 Reputation points
commented 2023-03-14T22:17:41.4633333+00:00
Karen Payne MVP 29,881 Reputation points
0 answers

Change listview layout_below in code

Hello It's xamarin android platform i have a listview <ListView android:layout_width="match_parent" android:id="@+id/dgvresult" android:layout_below="@id/title1" …

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,902 questions
asked 2023-03-14T21:54:54.94+00:00
Shay Wilner 1,426 Reputation points
0 answers

How to display message as invoked

Hello i have a list of sunset for each day for a period of a month like the date and time sunset i would like to check every seconds if sunset time has arrived and then display a message. i implemented using a timer but the message is not displayed …

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,902 questions
asked 2023-03-12T18:11:31.43+00:00
Shay Wilner 1,426 Reputation points
commented 2023-03-14T21:24:54.09+00:00
Shay Wilner 1,426 Reputation points
1 answer

Unable to read Nikon EXIF tags

I've encountered a problem reading certain EXIF tags from Nikon cameras. I've tested images taken with couple different Canon cameras (no problems) and several Nikon cameras (D850, D5, D6, Z9). With the images from the various Nikon cameras, .NET (I'm…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
822 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.
976 questions
asked 2023-03-04T01:15:14.65+00:00
Richard Rosenheim 21 Reputation points
edited an answer 2023-03-14T21:24:16.1066667+00:00
Richard Rosenheim 21 Reputation points
2 answers

Once again when will MS fix VS 2022

So I have now spent another couple of hours trying , pleading with Visual Studio to get it together. Notice the status msg, "All Succeeded" meaning no errors but VS shows errors and I have not been able to get rid of them. Clean, Rebuild,…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,029 questions
asked 2023-03-14T15:46:18.4+00:00
Lloyd Sheen 781 Reputation points
commented 2023-03-14T20:38:16.7033333+00:00
Lloyd Sheen 781 Reputation points
2 answers One of the answers was accepted by the question author.

System.IO.FileNotFoundException: 'Could not load file or assembly

I have an application in .net core. the application was running fine, but the error started coming after I installed dotnet add package Microsoft.AspNetCore.Authentication.Negotiate --version 6.0.14 Once I installed this package and put this line of code…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,772 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
703 questions
asked 2023-03-02T18:25:05.9533333+00:00
Anjali Agarwal 556 Reputation points
commented 2023-03-14T20:37:57.2266667+00:00
Darin Milligan 0 Reputation points
2 answers One of the answers was accepted by the question author.

Why are there variables of interface type, in c#

private ICollection<Resistor_Info> _resistorlist; “ICollection” Can be a type?

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,431 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,263 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,700 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
822 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
489 questions
asked 2023-03-14T08:09:09.1966667+00:00
兰树豪 201 Reputation points
answered 2023-03-14T20:35:01.9866667+00:00
Bruce (SqlWork.com) 30,301 Reputation points
1 answer

how to fix : Could not load file or assembly 'Azure.Core'

I have a .net framework 4.2 Test Project, which calls methods in .net 4.2 a class library called Interface. Interface references another class library that holds the nuget 'azure.core' in the test project , I tried adding a bindingRedirect to…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
822 questions
asked 2022-09-01T19:06:45.273+00:00
commented 2023-03-14T20:19:49.43+00:00
Navjot 41 Reputation points
2 answers

Is it accurate to view a .razor file as primarily a HTML file?

I am writing a blazor server side app. As I create the .razor files, I'm coming to view them as HTML files (heavy on the bootstrap) where in places I bring in an @event, @variable, and @directive as needed. It's real close to using JavaScript instead of…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
858 questions
asked 2023-03-14T17:46:55.23+00:00
David Thielen 591 Reputation points
edited an answer 2023-03-14T20:18:07.6833333+00:00
Bruce (SqlWork.com) 30,301 Reputation points
1 answer One of the answers was accepted by the question author.

web config page access and permission not working with Global asax Routing

How do I give permission to a web page or web form for all users in web config file when routing is done in the Global asax file? This is how I grant permission to all users in the web config file for a page named topic.aspx <location…

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.
449 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
822 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,301 questions
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.
593 questions
asked 2023-03-04T11:45:18.51+00:00
Donald Symmons 1,126 Reputation points
commented 2023-03-14T19:58:07.0166667+00:00
gary nagel 0 Reputation points
1 answer

Get a list of files in a directory in descending order by creation date.

I have created a folder that a user can copy and paste a monthly newsletter PDF into. Trying to get the monthly newsletter PDF list of files and sort them by the day they were created on the crownfile page, and then select the last recently modified file…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
703 questions
asked 2023-03-14T17:21:59.24+00:00
Oneil Drummond 20 Reputation points
commented 2023-03-14T19:54:05.95+00:00
Michael Taylor 40,426 Reputation points
3 answers

Is it possible to show empty label value if the value of a column used for date or time is null?

I have column for Name, Date and another one for Time. If the values of date and Time columns are null or empty, how do I get to still show the label value in null data value? Is this Possible? please how can I do that?. Here is what I mean in the…

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,431 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
822 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,301 questions
asked 2023-03-13T13:41:43.36+00:00
Donald Symmons 1,126 Reputation points
commented 2023-03-14T19:51:46.8033333+00:00
Michael Taylor 40,426 Reputation points
2 answers One of the answers was accepted by the question author.

How can I create an app icon on iOS?

I don't know how to create an app icon for my iOS application. I have tried to use Assets.xcassets but it's not working in Visual Studio for Mac 17.6 Preview (17.6 build 402) after adding Maui to my .csproj…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,029 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,431 questions
asked 2023-03-06T12:03:49.5566667+00:00
Kim Strasser 561 Reputation points
commented 2023-03-14T19:46:51.6566667+00:00
Kim Strasser 561 Reputation points
2 answers

How should I structure my Entity Framework access/query classes

I've placed all my EF model classes that represent my tables in the Models folder along with my DbContext class - as recomended. I now want to create a class for each table that access the DB using DbContext and the appropriate model class. This is the…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
466 questions
asked 2023-03-11T19:43:24.1166667+00:00
David Thielen 591 Reputation points
commented 2023-03-14T19:07:37.3033333+00:00
Karen Payne MVP 29,881 Reputation points
0 answers

Access Color inside Resources' Colors

Hi, I am trying to access a Color inside the Resources->Colors.xaml but getting this error: System.Collections.Generic.KeyNotFoundException: The resource 'ConnectedIconLight' is not present in the dictionary. at at…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,029 questions
asked 2023-03-14T18:58:59.2233333+00:00
Jassim Al Rahma 1,166 Reputation points
0 answers

Where to store Access Token after Web API Authentication?

I am having 2 application components: Web API protected with JWT WEB APPLICATION WEB APPLICATION authenticates user with login page (username, password) to the WEB API and gets the Access-token & Refresh-token. Where do I store 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.
449 questions
asked 2023-03-14T18:53:38.6266667+00:00
Kevin Azure 121 Reputation points
2 answers

How to load and run a .NET 6 project without .SLN file using VS 2022--

So basically my problem is - how do I run a .Net 6 Core project that does not have a .sln file. I downloaded a sample code from github for a project but when I went ahead to browse the code I discovered that the project does not have any .sln file. There…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,772 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,700 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
822 questions
asked 2023-03-14T16:16:03.6633333+00:00
P. G. Choudhury 1 Reputation point
edited an answer 2023-03-14T18:30:33.8233333+00:00
Bruce (SqlWork.com) 30,301 Reputation points
1 answer

Request length difference Azure app service deployed on Windows and Linux

Hi, I have one application implemented using web api 6 which is deployed on windows flavor. which is causing issue while trying to upload even 100 mb file "the page was not displayed because the request entity is too large." How can increase…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,772 questions
Azure App Services
Azure App Services
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,518 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.
166 questions
asked 2023-03-13T21:41:15.13+00:00
Abdul Qadir 0 Reputation points
answered 2023-03-14T18:20:38.1066667+00:00
Bruce (SqlWork.com) 30,301 Reputation points