Skip to main content

All Questions

0 votes
1 answer
63 views

I can't authorize with the token in local storage. Request to the API returns 200, but navigating to [Authorize] pages yields 302

Web API Enpoint [HttpPost("login")] public async Task<IActionResult> Login([FromBody] LoginRequestDto loginRequest) { var token = await _authService....
levent41's user avatar
0 votes
2 answers
84 views

How to auto update reason based on request No using JavaScript ajax?

I work on asp.net mvc i face issue i can't auto update reason using java script ajax auto update meaning when user start writing on reason it will save on database table Automatically based on Request ...
ahmed abdelaziz's user avatar
0 votes
0 answers
85 views

Cannot access the API from the application controller

There is a notes site that has the ability to create notes. After entering a note, I access the API and pass the note model to put it into the database. But it doesn't work, on invocation it returns a ...
MakkLaud's user avatar
0 votes
1 answer
669 views

How I can pass GraphQL header in ASP.NET Core 6?

I use ASP.NET Core to consume GraphQL API and everything working fine, just I need pass the header because I need to use Arabica language and I don't know how I can pass it. So I need to change ...
عالم ديم's user avatar
1 vote
2 answers
722 views

HTTP Error 500.30 error when app.Run() have an async delegate method in .NET 7

I am using .NET 7 web API application and I facing some issues to configure my application. In my application just wanted to show that API is Running like message in the base URL, however, when I try ...
Srijon Chakraborty's user avatar
0 votes
2 answers
634 views

Consuming asp.net core web api in asp.net core mvc web app

I'm trying to consume my asp.net web api in my asp.net core mvc web app which are on the same solution. I configured the solution for multi-project start and they start both. next I tried to consume ...
Abdi fatah's user avatar
0 votes
0 answers
250 views

Passing Roles from ASP.NET Web API to ASP.NET CORE MVC to allow Authorize Attribute in Controllers

I think this is the first time to ask a question here, but wanted to try. Hope I got this right. I have searched all over web but nothing seems to come up for this scenario. On a Test Project, I was ...
user3151868's user avatar
0 votes
1 answer
828 views

Unable to test c# rest controllers via in memory host integration tests

I am new to .net and c# and I am learning how to do integration testing on rest controllers in local. I went through the below link for understanding and created a sample project. https://www....
RRN's user avatar
  • 81
0 votes
1 answer
560 views

Object reference not set to an instancet - variable has value still error is coming [duplicate]

I am getting error like Object reference not set to an instance of an object. But while debugging I see value is coming perfectly in variable, so any idea why still this error is coming. please see ...
Nic's user avatar
  • 509
1 vote
2 answers
3k views

how to send array to API which contains image and other data in .net core

When I am passing a single object like below then it is working as per below image [HttpPost] public async Task<ActionResult> Post([FromForm] MyModel Details) { } but when I am passing the List ...
Explorer's user avatar
  • 421
3 votes
1 answer
2k views

Why I get Value cannot be null. (Parameter 'connectionString') error message after Adding Migrations

I have error message while I am trying to Add-Migration and I get error message Value cannot be null. (Parameter 'connectionString') What I did so far I check Startup.cs file and I wrote something ...
unknow_user's user avatar
3 votes
0 answers
1k views

What is the equivalent of IHttpControllerSelector for .NET 6?

We're implementing IHttpControllerSelector in our ASP.NET Web Api (.NET 4.5) for Controller Discovery because some of our Api Controllers resides on a different assembly and we have custom 'routing'(...
Vonzkie's user avatar
  • 61
0 votes
1 answer
152 views

How do I properly format HighStock x-axis ticks based on unix timestamps?

I'm having trouble properly labeling the x-axis ticks in my HighStock chart. Currently my chart looks like this: The x-axis ticks are incorrect. The ticks should change dynamically based on the ...
Ethan Partridge's user avatar
0 votes
1 answer
50 views

Use IdentityServer4 to control access to different methods in the same WebApi

Ideal effect flowchart For the current understanding of IdentityServer4, I found that the basic interface permission configuration is more suitable for permission control projects with multiple WebApi ...
JohnPisces's user avatar
0 votes
1 answer
39 views

UserManager steps out of the function without throwing any Excepcion

I am trying to make my MVC app create initial preview users in the database with following code: private async Task CreateStartupUsers(UserManager<IdentityUser> userManager) { ...
PetoMPP's user avatar
  • 78

15 30 50 per page
1
2 3 4 5
15