Using Location path Security in Web.config with Param=1?

L

luqman

I am using one common aspx file for different menus in ASP.Net and I want to
restrict some Menus.

For example: I want to Allow menu1.aspx?param=1 to users who have MENU1
Role, and menu1.aspx?param=2 to users who have MENU2 Role, but web.config is
not accepting location paths with Param ?

Pages which don't have param are working fine, and their relative menus hide
automatically, because I am using SecurityTrimmingEnabled Feature of
XmlSiteProvider.

Any idea please?

Best Regards,

Luqman
 
G

Guest

I am using one common aspx file for different menus in ASP.Net and I want to
restrict some Menus.

For example: I want to Allow menu1.aspx?param=1 to users who have MENU1
Role, and menu1.aspx?param=2 to users who have MENU2 Role, but web.config is
not accepting location paths with Param ?

Pages which don't have param are working fine, and their relative menus hide
automatically, because I am using SecurityTrimmingEnabled Feature of
XmlSiteProvider.

Any idea please?

Best Regards,

Luqman

I think you need to check it in the code

<% if User.IsInRole("admin") then %>
.... Allow menu1.aspx?param=1 ...
<% end if %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top