title: ASP.NET Core 3.0 Policy Redirect
body: <p>We have this portion of code who controls some Service Premium Pages. On method Deny redirects to a upgrade page, for the people who don't have premium membership.</p>
  
  <p>The code runs perfect on asp.NET core 2, but fails on asp.NET core 3. 
  context.Resource is no longer of type AuthorizationFilterContext, but Endpoint not provide a Result member.</p>
  
  <p>¿How can I make the page redirect with the new Enpoint provided on asp.Net core 3?</p>
  
  <pre><code>public Task Deny(AuthorizationHandlerContext context, SubscriptionRequirement requirement)
      {
          var mvcContext = context.Resource as AuthorizationFilterContext;
          if (mvcContext == null)
              return Task.CompletedTask;
  
          mvcContext.Result = new RedirectToActionResult("Upgrade", "Subscription", new { ReturnUrl = _contextAccessor.HttpContext.Request.Path });
          context.Succeed(requirement);
          return Task.CompletedTask;
      }
  </code></pre>