Re: roleProvider and Windows Authentication
From: Mark Parter (MarkParter_at_discussions.microsoft.com)
Date: 05/26/05
- Next message: Thammarat Charoenchai.: "Re: Folder Authorization."
- Previous message: IkBenHet: "Problem with uploading Image files."
- Maybe in reply to: Mark Parter: "roleProvider and Windows Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 26 May 2005 02:16:05 -0700
OK, I think I was getting confused as to how this whole security trimming
worked. I think I've got the jist of it now. Basically, you define in your
web.config file, what users/roles are allowed access to what. If you want to
override this, then you use the roles attribute in the appropriate
siteMapNode(s).
I've implemented this and it's still not functioning as expected. I'm being
denied access to the page because of the deny attrbiute in the web.config
file, but, the option is still being shown in the menu control :(
Have I made any obvious mistakes with the setup as shown below?
WEB.CONFIG
-----------------
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider"
description="SiteMap provider which reads in .sitemap XML files."
type="System.Web.XmlSiteMapProvider, System.Web,
Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
securityTrimmingEnabled="true"
siteMapFile="Web.sitemap" />
</providers>
</siteMap>
<authentication mode="Windows" />
....
<authorization>
<allow roles="STAFF\ARS Users,STAFF\ARS Admins" />
<deny users="*" />
</authorization>
</system.web>
<location path="registers/editregister.aspx">
<system.web>
<authorization>
<deny roles="STAFF\ARS Users" />
</authorization>
</system.web>
</location>
</configuration>
WEB.SITEMAP
-----------------
<siteMapNode title="Registers" url="" description="" roles="*">
<siteMapNode title="New Register" url="registers/newregwiz.aspx"
description="Create a new register based upon an issued reigster template" />
<siteMapNode title="Edit Register" url="registers/editregister.aspx"
description="Edit an existing register" />
<siteMapNode title="Register History" url="registers/reghist.aspx"
description="Show the history of a register" />
</siteMapNode>
- Next message: Thammarat Charoenchai.: "Re: Folder Authorization."
- Previous message: IkBenHet: "Problem with uploading Image files."
- Maybe in reply to: Mark Parter: "roleProvider and Windows Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|