Security trimming problem with not absolute path

Discussion in 'ASP .Net Security' started by Alexj, Feb 23, 2010.

  1. Alexj

    Alexj Guest

    Hello, I have a problem that for many of you will surely be trivial, I wanted
    to enable the security trimming by xml, everything works if I insert full
    address in the sitemap.
    But if I put the ~ as shown below does not work the disappearance of the
    menu items to unauthorized persons:

    xml version = "1.0" encoding = "utf-8"?
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
    <siteMapNode url="#" title="Start" description="Inizio" roles="*">
    <siteMapNode url="~/CreazioneDocumentale/antfattStep1.aspx?enc=99999"
    title="Creazione Distinta" roles="Domain\0001" />
    <siteMapNode url="~/CreazioneDocumentale/antfattStep1.aspx?enc=3333333"
    title="Pred. Request "description="Pred. Request BO" roles="Domain\0002" />

    </ siteMapNode>
    </ siteMap>

    Below a part of web.config:

    <authentication mode="Windows"/>

    <siteMap defaultProvider="xmlSite" enabled="true">
    <providers>
    <clear/>
    <add name="xmlSite" type="System.Web.XmlSiteMapProvider"
    siteMapFile="~/Sitemap/filename.sitemap" securityTrimmingEnabled="true"/>
    </providers>
    </siteMap>
    <roleManager enabled="true"
    defaultProvider="AspNetWindowsTokenRoleProvider">
    <providers>
    <clear/>
    <add name="AspNetWindowsTokenRoleProvider"
    type="System.Web.Security.WindowsTokenRoleProvider"/>
    </providers>
    </roleManager>

    <authorization>
    <deny users="?"/>
    <allow roles="Domain\0001"/>
    </authorization>


    Thanks in advance for answers.
     
    Alexj, Feb 23, 2010
    #1
    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. Paul
    Replies:
    0
    Views:
    359
  2. =?Utf-8?B?TSBIYW1tZXR0?=

    Security Trimming and SiteMap

    =?Utf-8?B?TSBIYW1tZXR0?=, May 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    =?Utf-8?B?TSBIYW1tZXR0?=
    May 15, 2006
  3. Replies:
    2
    Views:
    4,841
  4. John Yopp
    Replies:
    0
    Views:
    655
    John Yopp
    Jun 22, 2006
  5. James Byrne
    Replies:
    3
    Views:
    580
    James Byrne
    Sep 14, 2010
Loading...

Share This Page