Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 是否可以在已授权atribute的操作上添加cutstom路由?_C#_Asp.net Core 5.0 - Fatal编程技术网

C# 是否可以在已授权atribute的操作上添加cutstom路由?

C# 是否可以在已授权atribute的操作上添加cutstom路由?,c#,asp.net-core-5.0,C#,Asp.net Core 5.0,我有一个只有在用户登录时才能访问的操作,如果没有,则[Authorize]接口将路由到帐户/登录。我已经有了一个名为AgentController的用户控制器 [Authorize] public IActionResult Privacy() { return View(); } 是否有方法将授权重新路由到AgentController而不是帐户?服务器控制器。所有客户端和要做的就是指定凭据。必须将服务器

我有一个只有在用户登录时才能访问的操作,如果没有,则[Authorize]接口将路由到帐户/登录。我已经有了一个名为AgentController的用户控制器

        [Authorize]
        public IActionResult Privacy()
        {
            return View();
        }

是否有方法将授权重新路由到AgentController而不是帐户?

服务器控制器。所有客户端和要做的就是指定凭据。必须将服务器配置为允许路由。请参见角色: