Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [.net-core-2.1]

Use this tag for questions specifically related to .NET Core 2.1, in addition to using the '.NET Core' tag.

.net-core-2.1
-1 votes
1 answer
113 views

Is there a solution to auto-update a .NET Core 2.1 console app project?

I have written a .NET Core 2.1 console application in C#. It must work on Windows 7, my clients' systems, so I can't upgrade it to .NET core 3.1 or above. Now I made some changes in my app and I ...
Melody's user avatar
  • 1
1 vote
0 answers
83 views

.NET Core 2.1 Authorization based on Active Directory

I am supporting an ASP.NET Core 2.1 Web API which returns client data. This API is hosted on the company's intranet on an IIS server. As of now, there is no authentication and anyone on the company's ...
Mandar Patil's user avatar
1 vote
1 answer
347 views

How can I find where a specific SDK dependency is coming from in a dotnet core solution that fails to build because of it?

I'm working on a .Net Core 2.1 codebase (it needs upgrading but time constraints have prevented that so far). I added a Nuget package, FFMpegCore, which had a dependency on System.Text.Json 7.0.1. The ...
jlmt's user avatar
  • 1,987
0 votes
0 answers
40 views

How to catch global exceptions in the version of .NET Core 2.1

The old project that the company is maintaining is using .NET Core 2.1. AddHostedService is written in the program file to register the background service. Now some background services throw unhandled ...
Ivan Law's user avatar
0 votes
0 answers
2k views

Error: The reference assemblies for ".NETFramework,Version=v6.0" were not found

I need help, because I can't solve this problem alone. I rebuild a C# project in VS 2019. In first, I didn't have dotnet folder, so I downloaded it from here: Download .NET Core 2.1 Download .NET Core ...
Rina Barak's user avatar
-2 votes
1 answer
3k views

How do I migrate this into my .NET 6 Program.cs file without using the startup class? The code is from .NET Core 2.1, also in Program.cs

I want to add this to my program.cs without having to use a startup class. I've read the Microsoft docs but can't seem to get it to work. public static void Main(string[] args) { var host = ...
Fiskkrok's user avatar
1 vote
1 answer
5k views

How to use 'MapControllers' in ASP.NET Core 2.1

See Routing to controller actions in ASP.NET Core This doc page can be switched to 2.1. It shows attribute routing instructions. But, methods like app.UseEndpoints(()=>), endpoints.MapControllers();...
x troy's user avatar
  • 21
1 vote
1 answer
307 views

How to remove URI extra slash when I converted NSUrl to URI

When I am trying to convert NSUrl to URI added an extra slash in the URL below is the method public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options) { Uri uri = new Uri(url....
Roshan's user avatar
  • 31
1 vote
1 answer
965 views

Azure AD after successfully logging in with Mobile, it gets stuck on a white blank screen

I am using Xamarin.Android: 12.0.0.3 for mobile app and backend side .net core 2.1 and Azure Active Directory I have registered a new app for the mobile app I have to add : Client id Tenant id and ...
Roshan's user avatar
  • 31
0 votes
1 answer
713 views

Upgrading from .NET Core 2.1 to .NET 5.0 shows an error: 'IApplicationBuilder' does not contain a definition for 'UseDatabaseErrorPage'

Can anyone provide a solution for the below error that I'm getting when Upgrading from .NET Core 2.1 to .NET 5.0: 'IApplicationBuilder' does not contain a definition for 'UseDatabaseErrorPage' and no ...
GauravKapoorMCA's user avatar
6 votes
2 answers
3k views

Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer threw an exception of type 'System.NullReferenceException'

I'm updating a package to .NET 5.0 from .Net Core 2.1. I've updated all the assemblies to the latest versions but am getting the error below from the Analyzer package: This error occurs due to the ...
kh25's user avatar
  • 1,278
0 votes
0 answers
932 views

Serilog has no method ".ForContext ()"

In my project, logging is implemented using Serilog. When I try to log a line, I would like to add some values that should not be included in the message, but should be in the log. My _Logger doesn't ...
kvv94's user avatar
  • 3
0 votes
0 answers
118 views

.NET Core 2.1 and .NET Core 5.0 Web-Apps on Same Server

We currently have a production server running multiple .NET Core 2.1 websites and we need to deploy a website running .NET Core 5.0 on that same server. I know I need to install dotnet-hosting-5.0.7-...
fictus's user avatar
  • 286
0 votes
1 answer
202 views

Selenium Sendkeys contain <ul><li> tag into textarea

When I try to send string contain <ul><li> tag into textbox using Selenium ,new tab is opened and textarea fill by <ul> only not <li> For example: var body = driver.FindElement(...
hojjat.mi's user avatar
  • 1,534
2 votes
1 answer
570 views

Prevent session timeout from resetting for periodical ajax calls

In my ASP.NET MVC application there is a periodical ajax call to fetch new notifications for the current user. However this call resets the idle timeout for the current session, causing the session to ...
Robbinb1993's user avatar

15 30 50 per page
1
2 3 4 5
12