Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Multiple routes and global attributes

$
0
0

hi guys

I am playing around with razor pages and building a new website with it.

  1. How do I add a global configuration to all the files in a folder e.g Pages >> Accounts folder (I know in webforms I could add this in the root web.config file or in MVC I could add the attribute to the root controller e.g the [Authorize] attribute and it would apply to all controller actions
  2. How do I add multiple routes to a page as I have Pages >> Admin  which I want to be either administrator or admin currently I am using @Pages "/Admin"

thanks

Ehi


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>