CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 3/1/2007 1:46:09 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 26 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
Jamesleecs
Asp.Net User
Sitemap and Security Trimming Problem3/1/2007 1:46:09 AM

0/0

 

When I run the page and enter my login, I got login but when I click to a secure Admin page I got the following error:

Server Error in '/Membership' Application.

Access is denied.

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

 

 Here are my Web.config setting:

 <?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <connectionStrings/>
  <location path="membership" allowOverride="false">
  <system.web>
   
        <siteMap defaultProvider="default" enabled="true">
        <providers>
          <add name="default"
                           type="System.Web.XmlSiteMapProvider "
              siteMapFile="Web.sitemap"
              securityTrimmingEnabled="true" />
        </providers>
      </siteMap>

 

here are my web.sitemap file:

 

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
      <siteMapNode url="" title="Navigate Here"  description="">
      <siteMapNode url="Login.aspx" title="Login"  description="" />
      <siteMapNode url="CreateAccount.aspx" title="Create Account"  description="" />     
      <siteMapNode url="ChangePW.aspx" title="Change Password"  description="" />
      <siteMapNode url="ForgotPW.aspx" title="Forget Password"  description="" />
      <siteMapNode url="Logged Out.aspx" title="Logged Out"  description="" />
     
      <siteMapNode url="Admin\ManageAccount.aspx" title="Admin Account" roles="administrators" description="" >
      <siteMapNode url="Admin\Page1.aspx" title="Page 1" roles="administrators"/>
      <siteMapNode url="Admin\Page2.aspx" title="Page 2"/>
      <siteMapNode url="Admin\Admin.aspx" title="Admin"  description="" />
    </siteMapNode>
  </siteMapNode>
</siteMap>

 

and my Admin/web.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
        <authorization>
            <allow roles="administrators" />
            <allow roles="Admin" />
            <deny users="*" />
        </authorization>
    </system.web>
</configuration>


can someone please tell what is the problem? I have been trying for many times to fix it. 

Ramzi.Aynati
Asp.Net User
Re: Sitemap and Security Trimming Problem3/1/2007 10:02:42 AM

0/0

try removing <location path="membership" allowOverride="false"> cause what u included in here is a folder "membership", where path points to a file, for that ur getting this error.

Hope this helps


Regards
Ramzi
--------------------------------------------
Dont Forget to mark the post as answered once replied.
Jamesleecs
Asp.Net User
Re: Sitemap and Security Trimming Problem3/1/2007 6:37:08 PM

0/0

if i remove the <location path="membership" allowOverride="false"> my sitemap will not show up at all.

Ramzi.Aynati
Asp.Net User
Re: Sitemap and Security Trimming Problem3/1/2007 8:48:11 PM

0/0

Try to replace "membership" with one of the pages, and try to access this page

can u see ur sitemap in this page ?


Regards
Ramzi
--------------------------------------------
Dont Forget to mark the post as answered once replied.
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0: Your Visual Blueprint for Developing Web Applications Authors: Chris Love, Pages: 339, Published: 2007
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Visual Web Developer 2005 Express Edition For Dummies Authors: Alan Simpson, Pages: 358, Published: 2005
Essential ASP.Net 2.0 Authors: Fritz Onion, Keith Brown, Pages: 345, Published: 2006
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Professional ASP.NET 2.0 Databases Authors: Thiru Thangarathinam, Pages: 504, Published: 2007
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005

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 don't match up). Hi Jon,. In the middle of a similar problem where css ...
ASP.NET 2.0 Navigation and Security Trimming re: ASP.NET 2.0 Navigation and Security Trimming. Gravatar Joel The problem you' d have if you configured only in siteMap is that users can navigate directly ...
ASP.NET Site-Map Security Trimming A common security requirement for Web sites is to allow only some members or other authenticated users to see certain pages. ASP.
Web.siteMap, Security Trimming and Absolute URL'S Mar 10, 2008 ... Security trimming is a feature which allows you to hide the urls based on the roles. This mean you can have a single web.sitemap file which ...
Dan Sellers's WebLog : Security Trimming and Site Navigation ... Below is an example of how to enable the Security Trimming in the Web config:. < system.web>. ...
Custom security trimming in ASP.NET sitemaps - Alex Thissen Weblog ... Custom security trimming in ASP.NET sitemaps. In ASP.NET you can create a sitemap to capture the pages that are available in your web application. ...
ASP.NET SiteMap Security Trimming Sep 24, 2007 ... NET SiteMap Security Trimming. It's often the simplest things that can take the most time to solve. So it was when I was setting up a web ...
ASP.NET.4GuysFromRolla.com: Examining ASP.NET 2.0's Site ... Dec 28, 2005 ... NET 2.0's site navigation provides a feature called security trimming. When obtaining site map information with security trimming enabled, ...
menu background image problem with security trimming enabled ... menu background image problem with security trimming enabled sitemap. Last post 08-21-2008 7:13 PM by Dave Sussman. 3 replies. Sort Posts: ...
Walkthrough: Filtering Site-Map Nodes Based on Security Roles Create a site map and enable security trimming. ..... However, security trimming is not enabled by default, so the siteMap Element (ASP. ...




Search This Site:










how to add custom database item templates?

help with dropdownlist

worddocument in asp.net pages

menu - graphics shift when using large font

redirection from a tab in dnn 2.0.2

when will asp.net 2.0 and studio 2005 be released?

uploading files, saving and retrieving files to network locations...

dropdownlistbox refreshing

ie5.5 - smartnavigation - response.redirect

simple regular expression ????

moving web parts programmatically

page.isvalid... pls help me...

passing variables to user controls

page creation

login via ssl only

how to disable shift + click treenode to open in new window?

e-library

global event handling

user control

trouble with request.form- output is blank

reference to a non-shared member requires an object reference

how to transfer pages from the app_data to the index page ?

send email from dnn

make controls invisible even if back button is pressed.

xp iis 5.1 "http 405 - resource not available"

problem with sending mails - the from field

passwordrecovery - the password is sent encrypted

using datareader with a single result

dnn providing web services

menu items with both images and texts?

 
All Times Are GMT