CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 11/15/2006 2:57:02 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 31 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
EdwardC
Asp.Net User
Menu Adapter with Security Trimming problem11/15/2006 2:57:02 AM

0/0

Hi,

I have the sitemap file with role attached like the following.
And I have also enabled security trimming on sitemap provider.
I handle my login authentication with Application_AuthenticateRequest event (refer code attached).
User login is handled by my own class, macthing to my own user table.

After a successful login from a user (with role properly assigned), the menu didn't hide what it supposed to.
User with "CS" role still can see the rest. When I checked, it displayed correctly current user roles, name.
Authorization is also work well, user can't access to folder where their role is not there. I did not use Role Manager in my case.

Is the Menu Adapater Beta 3 compatible with Security Trimming features ? Or I did it wrong somewhere.

<

siteMapNode title="Customer Service" url="~/CS/default.aspx" roles="CS">

<

siteMapNode title="Spreadsheet" url="~/CS/1.aspx"/>

<

siteMapNode title="Word Processor" url="~/CS/2.aspx"/>

<

siteMapNode title="Games" url="~/CS/3.aspx"/>

</

siteMapNode>

<

siteMapNode title="MDS" url="~/MDS/default.aspx" roles="MDS">

<

siteMapNode title="Programming" url="~/MDS/1.aspx"/>

<

siteMapNode title="Web Apps" url="~/MDS/2.aspx"/>

<

siteMapNode title="WinForm Apps" url="~/MDS/3.aspx"/>

</

siteMapNode>

<

siteMapNode title="Sales Office" url="~/SO/default.aspx" roles="SO,ALL">

<

siteMapNode title="Processes" url="~/SO/1.aspx"/>

<

siteMapNode title="Management" url="~/SO/2.aspx"/>

<

siteMapNode title="Recruiting" url="~/SO/3.aspx"/>

</

siteMapNode>

 

Global_asax:

Protected Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)

If Not HttpContext.Current.User Is Nothing Then

If HttpContext.Current.User.Identity.IsAuthenticated Then

If TypeOf HttpContext.Current.User.Identity Is FormsIdentity Then

Dim Id As FormsIdentity

Id =

CType(HttpContext.Current.User.Identity, FormsIdentity)

Dim ticket As FormsAuthenticationTicket = id.Ticket

 

' Get the stored user-data, in this case, our roles

Dim userData As String = ticket.UserData

Dim roles() As String = userData.Split(","c)

HttpContext.Current.User =

New GenericPrincipal(id, roles)

End If

End If

End If

End Sub

 

 

Russ Helfand
Asp.Net User
Re: Menu Adapter with Security Trimming problem11/15/2006 3:40:31 AM

0/0

Does this work if you disable the adapters?
Russ Helfand
Groovybits.com
EdwardC
Asp.Net User
Re: Menu Adapter with Security Trimming problem11/15/2006 6:14:15 AM

0/0

How do I temporary disable it ?

Another thing I noticed is that if I put role="*" on the 1st element like below will make the menu rendered incorrectly, some 1st level and sub levels are completely missing. This happens even I have removed all roles attribute from all children tags.

<

siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">

<
siteMapNode title="Home" roles="*">
   <siteMapNode title="Customer Service" url="~/CS">

 

.......

 

Russ Helfand
Asp.Net User
Re: Menu Adapter with Security Trimming problem11/15/2006 4:45:14 PM

0/0

To temporarily run without the adapters, move App_Browsers\*.browser to another location on your disk.  If your App_Browsers folder is empty, you will be running without adapters.  Later, you can always move the .browser file(s) back into App_Browsers to reenable the adapters.
Russ Helfand
Groovybits.com
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The Software Catalog: Microcomputers, Winter, 1990 Authors: Menu International Software, Pages: 0, Published: 1990
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
Special Edition Using Microsoft Windows XP Home Authors: Robert Cowart, Brian Knittel, Pages: 1141, Published: 2005
Windows XP All-in-One Desk Reference For Dummies Authors: Woody Leonhard, Pages: 816, Published: 2004

Web:
ASP.NET Menu and SiteMap Security Trimming (plus a trick for when ... NET Menu and SiteMap Security Trimming (plus a trick for when your menu and security ..... In the middle of a similar problem where css adapters may help. ...
ASP.NET SiteMap Security Trimming Sep 24, 2007 ... Drag on a Menu control on to your master page and your away ... CSS Adapter for ASP.Wizard Control · ASP.NET SiteMap Security Trimming ...
Need help adding css menu adapter to an existing project. - ASP ... Problem with current display of menu in FireFox is the all Top level menu ..... to page with code and I have security trimming enabled. ...
Struts Menu Tag Library - Security Model Struts Menu comes with a single concrete implementation of the PermissionsAdapter, called RolesPermissionsAdapter. This adapter maps the user's security ...
Two phones in one - my happier life with a dual SIM adapter Apr 15, 2006 ... The adapter's menu allows to choose between two network lines and ... Trimming the SIM cards was not a problem, the adapter hardware and ...
CSS Adapters - Simplified MenuAdapter I didn't like the css menu code too. Lots of code for a small menu. Oyunlar. ... CSS Adapter for ASP.Wizard Control · ASP.NET SiteMap Security Trimming ...
CAD Adapter for TRIM Context Using the buttons or menu items a drafter can store and retrieve drawings, ... With TRIM you get built-in versioning, security, and the ability to store CAD ...
IBM WebSphere Business Integration Adapter for WebSphere MQ ... From the Specific information search menu, select Announcements, and click Go. ... If you encounter a problem with WebSphere Business Integration Adapter ...
ASP.NET Debugging : Validation of viewstate MAC failed error Either increasing the amount of data that it allows through, or trimming the viewstate ..... The Friendly Menu Adapter is also working again by doing this. ...
securityTrimmingEnabled Treeview Adapter - ASP.NET Forums I have the same problem for both treeview and menu. ... you that I didn't put anything special into them to deal with security trimming. ...




Search This Site:










free skins

could not load data provider

user control

custom business objects & array lists

how to create main menu item without a page link?

custom module "could not load type error"

anyone know of a module that fills in the subscription gaps for 3.1

should i upgrade to 3.2 if priority is on performance gain/bug fixed for dnns already in production?

set version 2.1.2 configuration error

dotnetnuke - require read permission to drive root to install...!?

xml/xsl module in 2.0.4 problem...

3.0+ module/cell padding

packaging multiple skin/container sets in one zip file

how can i copy all users from one portal to another?

migrating existing non dnn site to dnn

dnn 3.0.4 issue - newsletter localization

file manager critical error has occurred.

potential search bug in dnn 3.0.13

finally here: capital area dnn user group - 1st meeting is tomorrow!

custom module tutorial (with sql db interaction)

open source ecommerce app?

webmail

3.0.11 solpart menu error

wire some events after successful login

getting the current portalid

error dns with some url

where is a scrolling news?

error using news article module - help, pls...

help! cannot log in admin/host page

user tracking (clicks)

  Privacy | Contact Us
All Times Are GMT