开发者

Restricted access for usercontrol by role

开发者 https://www.devze.com 2023-04-05 05:18 出处:网络
is possible to limit access for particular usercontrol for particular role? I have page (default.aspx) 开发者_高级运维that load (also) info.ascx

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!


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号