0

I'm sending users a link to a page in my application that will require them to authorize. These are first-time visitors, so I'd like to redirect them to Register instead of Login.

My controller action is in the form of:

    [Authorize]
    public ActionResult Index()
    {
        return View();
    }

I found several similar posts here but none that used ASP.net Identity. Ideally this would be something I could set in web.config like:

<authentication mode="Forms">
  <forms loginUrl="~/Controller/Action" />
</authentication>
extensionhelp
  • 564
  • 1
  • 4
  • 18

1 Answers1

0

This could help you: Redirect to another page when user is not authorized in asp.net mvc3.

You can create custom authorize attribute which will redirect a user to desired page

adolja
  • 189
  • 1
  • 10