1

is possible to limit access for particular usercontrol for particular role?

I have page (default.aspx) that load (also) info.ascx

I wanto to restricted access to info.ascx and display a message like 'unauthorized' where he was to be loaded.

thanks!

maurox
  • 1,254
  • 1
  • 19
  • 33
  • See the answers here: https://stackoverflow.com/questions/2433305/how-can-i-limit-asp-net-control-actions-based-on-user-role. Some of them should be helpful for usercontrols also. – Dov Miller Dec 24 '17 at 13:18

2 Answers2

2

There is nothing inbuilt in ASP.Net. You would have to implement your own access control using the Role providers and Custom user controls.

Chandermani
  • 42,589
  • 12
  • 85
  • 88
0

You can use

<authorization>
    <allow users="user1, user2"/>
    <deny users=”?”/>
</authorization>

This article may help: http://www.codeproject.com/Articles/301324/Authorization-in-ASP-NET

Code_Tech
  • 775
  • 13
  • 42