945 questions
0
votes
1
answer
91
views
ASP.NET Core prevent logout after register new user
I am working on ASP.NET Core 2.2. After the user registers for the first time, the user is redirected to their personal page, which requires logging in.
This is the script in my login.cshtml:
<...
0
votes
1
answer
144
views
Why does my Angular 9 sort routine work great when using Google Chrome (Ch131) browser, but works poorly (gets Wait msg) when using MS Edge (Ch131)?
I'm still on Windows 10 but I have all Windows 10 updates installed. I have gone through Settings and Repaired/Modified my MS Edge install to latest version, so all that should be good.
My Component ...
1
vote
0
answers
72
views
ASP.NET Core 2.2 - Swagger Serialization Upper CamelCase after Migration to System.Text.Json
I have an ASP.NET Core 2.2 Web API using Swagger.
I recently upgraded from Swashbuckle.AspNetCore 4.0 to 6.5.
Besides some minor issues I just realized that the new serialization with System.Text.Json ...
0
votes
1
answer
639
views
How to force all URLs to lowercase in ASP.NET Core 2.2 and newer version?
I want to convert all URLs to lowercase.
For example:
https://ABC123.com/ -> https://abc123.com/
https://StackoverFlow.com/ -> https://stackoverflow.com/
Thanks in advance
0
votes
1
answer
95
views
NHibernate create criteria, add Restrictions on related table with nullable foreign key
I work on a Api project in .NET core 2.2 with NHibernate (5.2.5)
Table A has nullable foreign key from table B
I need to create a criteria to filter Table A, ...
1
vote
1
answer
1k
views
Error 400 on login with ASP.NET Core Identity
I have an application that has been running for 4 years with Microsoft.AspNetCore.Identity and .NET Core 2.2 . I have a modification to make and I have taken out the old file .ZIP. I had done this ...
0
votes
1
answer
698
views
NSwagStudio deserializing error when return type is string
I am experiencing the following error: NSwagStudio generates a typescript client which is trying to deserializing json when api return type is plain string.
I am using .netCore 2.2 and NSwagStudio 13....
0
votes
2
answers
1k
views
ASP.NET Core MVC View not found when running as a standalone application
I have a case when the startup process of an ASP.NET Core 2.2 application occurs inside a library. The application calls that library to build and run the host.
The setup code in the library adds the ...
0
votes
1
answer
1k
views
ASP.NET Core - Azure Active directory Authentication - Unable to obtain configuration from: 'System.String'
I have a .NET Core 2.2 / Angular 10 app where I want to implement an Azure AD login. The app already has a simple user/password login using JWT:
services.AddAuthentication(options =>
{
...
0
votes
1
answer
503
views
ASP.NET Core MVC : I can't prevent back button
I am working with ASP.NET Core 2.2 MVC.
I try this code in JavaScript:
window.history.forward(1);
but it did not work. I want to stop back button after logout.
Please help me
0
votes
1
answer
121
views
.NET Core : Areas attribute route value not passed correctly
Area route link with parameter returns
`/admin/home/edituser/b36c7c26`
instead of
`/admin/home/edituser?id=b36c7c26`
This in turns scatters my interface, meanwhile am using the standard ASP.NET tag ...
1
vote
1
answer
3k
views
Binding Configurations to a Complex Object
In ASP.NET Core 2.2, I'm trying to bind an array of JSON objects to a matching C# object, but it's not binding the members properly. (Spoilers: Test1 works, Test2 doesn't.)
In my appsettings.json, I ...
0
votes
1
answer
434
views
Overriding DistributedMemoryCache to Use DistributedSQLCache
I have an aspnet core 2.2 application that uses DistributedMemoryCache, and I want to change it to DistributedSQLCache, without recompiling and changing that application (It's already compiled), so I ...
0
votes
1
answer
511
views
MassTransit for .NET Core 2.2
My Application version : netcoreapp2.2
MassTransit packages:
<PackageReference Include="MassTransit" Version="7.1.8" />
<PackageReference Include="MassTransit....
1
vote
1
answer
2k
views
The type or namespace name 'OpenIdConnectOptions' could not be found while upgrading my ASP.NET Core 2.2 to 3.1
I am trying to upgrade my ASP.NET Core 2.2 to 3.1 but getting below error.
Not Sure how to resolve it.
I am getting below error
Severity Code Description Project File Line Suppression State
...
-2
votes
1
answer
2k
views
.net core 2.2 get action and controller name in logging middleware without ControllerContext
I am writing a middleware in .net core 2.2. I want to get name of Action and Controller name in the middleware.
I can not use ControllerContext because it not available at that time.
Here is solution ...
0
votes
1
answer
238
views
Partial views no longer get View Data after upgrading from .NET Core 2.2 to .NET 5
I'm working on updating a web app from .NET Core 2.2 to .NET 5. Most things are working pretty well, but I'm stuck on the partial views.
The website uses a ton of Ajax requests and most return a small ...
0
votes
1
answer
3k
views
asp.net core 2.2 web api "No authenticationScheme was specified, and there was no DefaultChallengeScheme found" error Azure AD
The configuration looks ok. but i get the error while trying to add Azure AD based authentication.
Startup.cs => ConfigureServices
public void ConfigureServices(IServiceCollection services)
{
...
0
votes
0
answers
378
views
Open a razor page from JS with long url
Using ASP.NET Core 2.2 with razor pages... I have a razor page1 which includes a table with lots of integer Id-values from a database. I have to open another razor page via JavaScript and pass all the ...
0
votes
1
answer
2k
views
Multi-Tenancy System With Separate Databases in .Net Core
I am trying to create implementing database per tenant strategy. but I don't understand how I actually will do that.I followed this link https://www.codeproject.com/Articles/848111/Multi-Tenancy-...
1
vote
1
answer
4k
views
Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseSqlServer' call on ASP.NET core 2.2
I'm using aspnetboilerplate solution developed with ASP.NET core 2.2 . The backend is deployed on azure and it uses the SQL server provided.
Sometimes, when the backend has a lot of requests to handle,...
1
vote
0
answers
150
views
What is a good architecture to add an API to an existing ASP.Net Core 2.2 MVC solution
When I started development of my current project I had no knowledge or prior experience of web development, ASP.Net (Core), C#, JS and so on.
With a lot of reading, excercising and testing I now have ...
0
votes
2
answers
3k
views
Validate if input already exist in database ASP .NET Core 2.2
I have a form with some input fields and when you click on Save, I do a check if a field already exist in the database. I have a service method for this.
For example in the database the field with ...
0
votes
1
answer
3k
views
How to make function make download file from path on asp.net core 2.2?
I work on project use .net core 2.2 visual studio 2017 Web API
I Need to make function download file
Give function path of file will be download and download file and return Void .
I need to make ...
-2
votes
1
answer
546
views
can't use replace function when upload files API on asp.net core 2.2
I work on ASP.NET Core 2.2 Web API and face an issue: I can't use replace function to change the name property of a selected file that I get when uploaded.
When I try like this:
string fileName = ...