Skip to content

An unhandled exception occurred while processing the request #32

Open
@kuldeep17910

Description

@kuldeep17910

Hi @mo-esmp Thanks for this excellent repository. Some initial small problems I faced are :

I am using .Net Core 6.0

  1. After successful login you can log out (error - Access denied You do not have access to this resource) because you do not have any default access and to give access you have to manually disable the restrictions (as comments [Authorize] in controllers & all required secure-content asp-area="" asp-controller="Role" asp-action="Index" in _Layout.cshtml).

  2. I found that when creating role without any access it is throwing the following errors and same error when we edit the role and try to give the access from access list
    ArgumentNullException: Value cannot be null. (Parameter 'value')
    Newtonsoft.Json.Utilities.ValidationUtils.ArgumentNotNull(object value, string parameterName)
    Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings)
    Newtonsoft.Json.JsonConvert.DeserializeObject(string value, JsonSerializerSettings settings)
    Newtonsoft.Json.JsonConvert.DeserializeObject(string value)
    eis4.Controllers.RoleController.Edit(string id) in RoleController.cs

  •       ViewData["Controllers"] = _mvcControllerDiscovery.GetControllers();
          var role = await _roleManager.FindByIdAsync(id);
          if (role == null)
              return NotFound();
          var viewModel = new RoleViewModel
          {
              Name = role.Name,
              SelectedControllers = JsonConvert.DeserializeObject<IEnumerable<MvcControllerInfo>>(role.Access)
          };
          return View(viewModel);
    

lambda_method364(Closure , object )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions