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

Discussion in 'ASP .Net' started by luqman, Jul 10, 2007.

  1. luqman

    luqman 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
    luqman, Jul 10, 2007
    #1
    1. Advertising

  2. On Jul 10, 4:45 pm, "luqman" <> wrote:
    > 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 %>
    Alexey Smirnov, Jul 10, 2007
    #2
    1. Advertising

  3. luqman

    luqman Guest

    I think thats the only solution, well thanks.

    Best Regards,

    Luqman

    "Alexey Smirnov" <> wrote in message
    news:...
    > On Jul 10, 4:45 pm, "luqman" <> wrote:
    > > 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 %>
    >
    luqman, Jul 11, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick Olurotimi Ige

    Web.Config (location path=)Question

    Patrick Olurotimi Ige, Apr 4, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    52,209
    grchuah
    Nov 5, 2006
  2. Geathaa
    Replies:
    2
    Views:
    677
    Geathaa
    Jul 30, 2003
  3. ectoplasm
    Replies:
    12
    Views:
    620
    Zorro
    Jul 28, 2005
  4. Grant Harmeyer

    Web.Config and subdirectory *location* security

    Grant Harmeyer, Jul 20, 2004, in forum: ASP .Net Security
    Replies:
    2
    Views:
    208
    Grant Harmeyer
    Jul 21, 2004
  5. Dave
    Replies:
    5
    Views:
    611
    John Bokma
    Apr 26, 2011
Loading...

Share This Page