RegisterAsync error Can’t load Login page with Successful message

Can someone help remove this error.

My result.IsSuccess will be false. My register function is broken.

My gihub link is:Thibaut501/Mango (github.com)

How when fix your RegisterAsync code, and then once it’s able to register users, then it will return true.

till same error.I have used the same codes as Mr Patel but no success.

When adding breakpoint

if (result!= null && result.IsSuccess)

result.IsSuccess false

Message "Not Found"

Result null

even I add for ResponseDto:

namespace Mango.Web.Models

{

    public class ResponseDto

    {

        public object? Result { get; set; }

        public bool IsSuccess { get; set; } = true;

        public string Message { get; set; } = "";

    }

}

Still same error.Any help

For ResponseDto result = await _authService.RegisterAsync(obj);

even I put a breakpoint to understand where is the error but I cannot find it.

Its only registering when ResponseDto: is

namespace Mango.Web.Models

{

   

        public class ResponseDto

        {

        public bool IsSuccess { get; set; }

            public object Result { get; set; }

            public string Message { get; set; }

        }



    }



also when change  if (result!= null && result.IsSuccess) to (result!= null && !result.IsSuccess if  only it works.) 

I want when if (result!= null && result.IsSuccess) that it works.

Any help,

Fabrice

Login page loads and Registration Successful message appears only when

(result!= null && !result.IsSuccess)
I want when (result!= null && result.IsSuccess)