Questions tagged [asp.net-core-2.1]
Use this tag for questions specifically related to ASP.NET Core 2.1, in addition to using the 'ASP.NET Core' tag.
asp.net-core-2.1
1,689
questions
0
votes
1
answer
30
views
How do I use cshtml links inside a controller class?
I have an older ASP.NET Core 2.1 web app project.
I have a .cshtml page in this folder in my project:
G:\Projects\AccessApp\Pages\Privacy.cshtml
And I want to use it in my controller. I've tried the ...
1
vote
2
answers
769
views
How to update ASP.NET Core 2.1 (running on .NET Framework) to newer builds?
I have an old app running on ASP.NET Core 2.1 and running on .NET Framework (yes, that is a thing).
OK fine. But I need to update that old project to include some new updates - specifically patched ...
0
votes
1
answer
2k
views
How to receive Json parameters from post request as JObject in ASP.NET Core 8.0 controller?
I have an application perfectly functioning, built in Angular 13 and .NET Core 2.1. Now I am upgrading it to .NET 8.0. I have successfully upgraded all other features, but I'm stuck at receiving the ...
0
votes
0
answers
30
views
API does not store keys from IdentityServer to validate tokens
I have two machines, one identity server and second REST API
A user through the API logs in, goes post to IS, in response IS returns JWT
The user authenticates himself to the API with each data ...
1
vote
0
answers
374
views
CreateNewOnMetadataUpdateAttribute does not exists in the namespace after Visual Studio update
After updating my Visual Studio to get .Net8, our older Core 2.1 project is getting an error that I can't explain. In the views it is starting to complain about the following:
CS0234 The type or ...
0
votes
1
answer
338
views
HTTP Error 500.32 - ANCM Failed to Load dll
I have upgraded a .NET Core 2.1 web app to .NET 7.
The application works fine on Visual Studio 2022.
When I deploy that to Azure through Azure DevOps pipelines, I get the following error:
HTTP Error ...
0
votes
3
answers
207
views
ILoggerFactory does not contain a definition for addconsole
I have upgrade a project from .NET Core 2.1 to .NET 7.
The original project had the following segment in startup.cs:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ...
0
votes
0
answers
179
views
Set HttpClient Basic Auth Header per client on backchannel logout in IdentityServer4 2.5.4 (.Net Core 2.1)
Remark: I know that .Net Core 2.1 is old, but at this moment I cannot update. It is planned for the future.
Situation:
One client needs a Basic Authentication header to accept the Back-Channel Logout ...
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 ...
0
votes
0
answers
37
views
Microsoft upgrade assistance tool : can I use this tool to upgrade ASP.NET Core 2.1 Web API to .NET 6?
My project is an API built with .NET Core 2.1. I need to convert to .NET 6 using the Microsoft Upgrade Assistance tool. I am not sure if I can do this or not.
Also, after upgrading the project using ...
2
votes
1
answer
325
views
Js file throwing an error after .net framework upgraded to 6.0
Old Framework -> .net core 2.2
upgraded framework -> .net 6.0
Deployed application to IIS 10
Error - Uncaught TypeError: Cannot read properties of undefined(reading 'toLowerCase')
Error->
...
0
votes
0
answers
53
views
Register Generic Interface in Startup in ASP.NET Core 2.1
I have below interface and it's implementations.
Interface:
public interface ITrigger<T> where T : class
{
void Send(T bodyContent);
}
Implementation:
public class AdminTrigger : ITrigger&...
0
votes
0
answers
122
views
IdentityServer 4, Backchannel-Logout, Reject Logout-Token, Bad Request
Situation:
I have my own OpenId based server and several clients. When I log out, I use the backchannel logout to log me out in all clients. The OpenId Specification tells me, that I need to verify ...
1
vote
1
answer
680
views
.NET Core Razor pages change pages to anonymous
I have a project with .NET Core 2.1 Razor Pages. It was built using the authentication option in the new project UI. So, when I type the URL and hit enter, the website opens the Microsoft login page, ...
0
votes
1
answer
164
views
How to add logging.AddEventSourceLogger() in F#
I need to do an Azure .NET Profiler Trace on my .NET Core 2.1.1 web app.
Azure provides the following instructions on how to do this:
Ensure that you have the below code in your app's Program.cs as
...