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

All Questions

Tagged with
0 votes
0 answers
20 views

ASP.NET Core MVC: Comment Replies Not Working After Refactoring

I am working on an ASP.NET Core MVC project that involves posts and comments. Users can leave comments on posts, and they can also reply to other comments. The initial implementation was working (...
Hr.Panahi's user avatar
  • 832
0 votes
0 answers
42 views

Populate a many to one relationship and how to show data input only once but increment if the date in the input are the same

I am currently working on a web project that required user to input a group of value for each person in a department per day then display it in two other index for day and month. I'm having problems ...
Trung Đặng Đức's user avatar
0 votes
0 answers
36 views

ASP.NET Core 8.0 JWT Authentication not working on others controller except the Authentication Controller

I'm encountering an issue with JWT authentication in my ASP.NET Core 8.0 application. While the token generation and authentication seem to work correctly in my AuthenticationController, any requests ...
user22096230's user avatar
-1 votes
1 answer
26 views

The website is called before pressing enter ASP.NET Core MVC

I created new project with ASP.NET Core MVC latest version. It shows a strange behavior. My code: public class VerificationController(TimeProvider timeProvider) : Controller { [Route("email-...
Thanh Nguyen's user avatar
1 vote
1 answer
94 views

How to I properly implement C# classes using ASP.NET Core MVC?

The assignment is to create an ASP.NET Core MVC web app that has a Student and a StudentWorker class. You then have the user input the information for a StudentWorker object (id, name, hourly pay, and ...
Nedmac624's user avatar
0 votes
1 answer
33 views

How to create dropdown in mvc to select object

As we can select object in angular, is there any way that I make asp.net Dropdown to select the object. I have a list in which there is Id, CountryName, CurrencyCode. I want CurrencyCode to be ...
Early Bird's user avatar
1 vote
1 answer
127 views

JWT ASP.NET Core MVC problem with authorization when check role

There was a problem with authentication, which was solved here. Now there is a problem with authorization, if I set the parameter Roles, I get an error. Program.cs: namespace MySteamDBMetacritic { ...
CriticalError's user avatar
-2 votes
2 answers
115 views

ASP.NET Core Identity InvalidUserName

I am working on an ASP.NET Core 6 MVC application that uses ASP.NET Core Identity. When I try to create a new user using the UserManager, I get this error: User name ' ' is invalid, can only contain ...
MrMustafa022's user avatar
0 votes
1 answer
56 views

Identity in ASP.NET Core 6 MVC

I am working on an ASP.NET Core MVC 6 application that uses ASP.NET Core identity and I am facing an issue trying to figure out how to work with the UserManager class. But UserManager always has null ...
MrMustafa022's user avatar
2 votes
1 answer
31 views

IViewLocalizer only show key instead of value from .resx file

I have a problem with ASP.NET Core localization. I want to use the method with IViewLocalizer. I have this Program.cs: using xxx.Data; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore....
user26437080's user avatar
-2 votes
0 answers
34 views

View method not found in controller function, not showing up in method list

I'm currently working on an ASP.NET Core project using Visual Studio, and I've encountered an issue where the View() method is not showing up in IntelliSense within one of my controller functions. ...
Saad Anwar's user avatar
1 vote
1 answer
53 views

Why my edit method don't work in ASP.NET Core

I had a EditEmployee method in AdminController. When I submit the edit form it display the error 404. It seem that the method don't recognize the EmployeeId I bind but I can't figure out [HttpPost] [...
Ann's user avatar
  • 13
0 votes
1 answer
38 views

C# ASP.NET Core 7 MVC web application with client certificate on some API calls

I have an ASP.NET Core 7 MVC web application that has full user authentication, but also has a couple of API endpoints. A need has arisen for us to allow authentication on those endpoints using client ...
Simon Parker's user avatar
  • 1,816
0 votes
2 answers
82 views

How to get IP address in ASP.NET Core 8 MVC project

I am creating an ASP.NET Core 8 MVC project and trying to fetch IP address with this code: var remoteIpAddress = HttpContext.Connection.RemoteIpAddress; But, the code throws an exception: Address = '...
Madhu Patel's user avatar
-3 votes
0 answers
59 views

.NET 8. project divided into three layers. The presentation layer is a web project. The rest of the layers are class libraries [closed]

I am trying to make a connection with the database and have this layer be dedicated to dealing with the database, but I get this error: CS1061 'DbContextOptionsBuilder' does not contain a definition ...
Saleh Salem's user avatar

15 30 50 per page
1
2 3 4 5
463