Debugging with Rider invoke wrong action method

Hi

I'm trying to debug an asp.net core API using Rider with docker-compose, but It trying to Invoke wrong Action method when I call api/messenger/files/upload
While the URL is api/messenger/files/upload it's trying to invoke UploadFileAsync instead of UploadLargeFileAsync.
and the strange part is that exactly same code work fine when I debug with Visual Studio.

project target framework is .net8

Rider: Build #RD-251.23774.471, built on April 28, 2025

Runtime version: 21.0.6+9-b895.109 amd64 (JCEF 122.1.9)

.NET Core v8.0.11 x64 (Server GC)

[RemoteService(Name = ConsoleMessengerRemoteServiceConsts.RemoteServiceName)]
[Area(ConsoleMessengerRemoteServiceConsts.ModuleName)]
[ControllerName("MessengerFileUpload")]
[Route("api/messenger/files")]
public class MessengerFileUploadController(IMessengerFileUploadService appService) : AbpControllerBase, IMessengerFileUploadService
{
    // Set a higher limit for the request form data (200 MB as default)
    [RequestFormLimits(MultipartBodyLengthLimit = 209715200)]
    [RequestSizeLimit(209715200)]
    [DisableFormValueModelBinding]
    [HttpPost]
    [Route("upload")]
    public async Task<FileUploadOutputDto> UploadLargeFileAsync() {
        //Some code here
    }

    [HttpPost]
    [Route("upload-form")]
    public Task<FileUploadOutputDto> UploadFileAsync(FileUploadInputDto input)
    {
        return appService.UploadFileAsync(input);
    }
}

This log show it's trying to invoke wrong Action method

[20:39:23 INF] Request starting HTTP/2 POST https://localhost:44352/api/messenger/files/upload - multipart/form-data; boundary="668177d8-ef74-4773-856b-1baff74a66b9" 53049130
[20:39:23 INF] CORS policy execution successful.
[20:39:23 INF] OpenIddict.Validation.AspNetCore was not authenticated. Failure message: An error occurred while authenticating the current request.
[20:39:23 INF] OpenIddict.Validation.AspNetCore was not authenticated. Failure message: An error occurred while authenticating the current request.
[20:39:23 INF] Executing endpoint 'Pezhvak.Console.MessengerUser.HttpApi.Controllers.MessengerFileUploadController.UploadFileAsync (Pezhvak.Console.MessengerUser.HttpApi)'
[20:39:23 INF] Route matched with {area = "console-messenger", controller = "MessengerFileUpload", action = "UploadFile", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Pezhvak.Console.MessengerUser.Application.Contracts.FileUploads.FileUploadOutputDto] UploadFileAsync(Pezhvak.Console.MessengerUser.Application.Contracts.FileUploads.FileUploadInputDto) on controller Pezhvak.Console.MessengerUser.HttpApi.Controllers.MessengerFileUploadController (Pezhvak.Console.MessengerUser.HttpApi).
0
2 comments

Hello,

Thanks for contacting Rider support. According to your description, I suspect the issue is probably that the obsolete image is being used. Could you please edit the docker-compose run configuration and set “build” as always, like below:

Let me know if it doesn't help. 

 

Regards,

Tom

0

Thanks for answer, Actually Enabling docker-fast mode + cleaning the solution fixed the problem.

0

Please sign in to leave a comment.