Skip to main content

Questions tagged [asp.net-core]

ASP.NET Core is an open-source, cross-platform framework for building web applications. Use this tag for questions about ASP.NET Core applications. Use a specific version tag when your question is specific to a particular version of ASP.NET Core.

1 vote
0 answers
12 views

ASP.NET Razor Pages, passing data from the front-end script to the back-end

I am working on a project where I am using a map and need to send feedback to the backend with the current zoom level. The problem is that the page only returns a 400 Bad Request error along with &...
Brian Acosta's user avatar
1 vote
0 answers
13 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
0 votes
0 answers
8 views

CKEditor 5 mini version

the last time i used ckeditor was i think 1 year ago. it was like this. go to their site. select what you want. change toolbar order. select langauge. download zip and use it in your project. now is ...
Saman's user avatar
  • 11
0 votes
0 answers
9 views

How to send email with attachment using brevo api

I am using brevo API and trying to send the base64 string as an attachment I am able to receive the email but not the attachment Here is my sample code var emailData = new { sender = new { email = ...
Developer's user avatar
  • 8,552
-1 votes
0 answers
21 views

How I can integrate, React client app and ASP.NET Core Web API backend and AD authentication and authorization [closed]

Scenario: React app has AD authentication and same token I wanted to use for .NET Core authentication and role-based authorization.
Ajay Gupta's user avatar
0 votes
0 answers
39 views

How can I make ASP.NET Core bind a CSV from query string to a class-level property that is a list of string?

I have this query in my URL: example.com/cars?brands=bmw,toyota I also have this property in my CarController: [BindProperty(SupportsGet=true)] public List<string> Brands { get; set; } But ...
AmirMohammad's user avatar
0 votes
1 answer
26 views

Attribute value html encoded when added to custom tag builder

I'm trying to add an OnClick attribute to a custom tag helper, but the value doesn't render properly. It looks like it gets encoded. AddAttribute: icon.AddAttribute("onclick", $"...
Stein Lundbeck Tech's user avatar
0 votes
2 answers
42 views

Unable to pass the byte data from angular with Uint8Array

I have my model as follows public class TimeSheetManagerModel { public string EmailId { get; set; } = string.Empty; public string EmployeeName { get; set; } = string.Empty; public int ...
Developer's user avatar
  • 8,552
0 votes
1 answer
37 views

ASP.NET Core 8 : singleton pattern with HttpContextAccessor does not work together

I'm developing an ASP.NET Core 8 application and using the singleton pattern for session management, but when I want to read the values, it displays null values! Here you can see the code: ...
Mohamad Ghafari's user avatar
0 votes
0 answers
32 views

CI/CD - GithubAction with Azure fails because of not able accessing AZure ressources

I have the following CI/CD Job in GitHub-Action: name: Build and deploy ASP.Net Core with Angular app to Azure Web App on: push: branches: - main workflow_dispatch: jobs: build-...
fass33443423's user avatar
-2 votes
1 answer
59 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
0 answers
13 views

How to return a Ok response from an Ocelot API gateway but then forward the request downstream for further processing?

I am trying to implement an Ocelot gateway application and I am facing an issue that I appreciate any suggestions. Under normal operation, WITHOUT THE GATEWAY, the upstream app (the client) posts a ...
Soundar Rajan's user avatar
1 vote
0 answers
20 views

How to Require Authentication for Each Browser Instance with ASP.NET Core?

Our application is in ASP.NET Core (.NET 6) using a MVC architecture with an authentication model that creates an "auth" cookie. After a user logs into the application with a Browser (...
cbuck12000's user avatar
0 votes
0 answers
24 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
0 votes
0 answers
15 views

How can I write delete test method for delete action in ASP.NET Core?

I want to write test method for delete action, but I don't know how and I would like the delete test method to be similar to Detail test method (code logic and syntax): // GET: ProductController/...
Zahra etehadi's user avatar

15 30 50 per page
1
2 3 4 5
5556