473,770 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem restricting access to folder to one role on anonymous site

I have a site which I want anonymous access to, but want to restrict
access by role to particular subfolders. I've tried to do this many
ways in web.config, but they have all resulted in members who don't
belong to any role being able to access the restricted subfolders. I
know how to do this in code, but I'd rather do it in web.config. I
believe the comments in "Step 3" in the article
http://www.devx.com/dotnet/Article/32223/0/page/2 have something to do
with this problem.

The snippets from the latest web.config attempts look something like:

root web.config: (I get same behavriour with no authorization section
in the root web.config)

<authorizatio n>
<allow users="?"/>
<deny users="*"/>
</authorization>

editor subfolder web.config:

<authorizatio n>
<deny users="?" />
<allow roles="Editor" />
<deny users="*" />
</authorization>

A member who belongs to no roles can access the editor subfolder after
logging in. The site uses forms authentication against a standard
generated ASP.NET 2.0 membership database. Any ideas?

Thanks

Nov 3 '06 #1
0 999

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
21111
by: Richard Muller | last post by:
Hi, I new to ASP. I have a problem with an ASP script opening a file for writing on my server. Here's how I got to this error: I downloaded a neat FileUpload ASP example from http://www.asp101.com/articles/jacob/scriptupload.asp. I copied to my wwwroot folder on my Win2000AS/SP4 server: - main .asp file
3
4870
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be protected by forms authentication. When I create forms authentication at root level it works but when I move my code up to the subfolder I get this error: Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
0
965
by: Andrew Banks | last post by:
I have some directory's in my web site which I only want to give users with a role of "management" access to. I have assigned the roles allready. Is it possible to control this using my web.config file? My current web.config file contains the code below, which makes sure users need to be logged in to access any files at all. I just want to add the extra restrictions to this so only the "management" role can access "directory1",...
1
4755
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem I have run into I am not sure how to fix, and really not sure what is causing it. Here's what is going on (test server - Windows 2003 Server): I have a page in a folder (under anonymous authentication in IIS6) that has a link on it that...
6
2147
by: Mr Newbie | last post by:
Hi, Im in a situation where I need to restrict users, but I dont have access or wont be allowed access to manage groups in the domain. How can I restrict access is this case ? -- Best Regards
1
1834
by: sonu | last post by:
Mark is creating a website using ASP.NET. He is using Forms authentication for authenticating and authorizing users. He has the following layout of files and directories in his website: Root ....File Manager/ ....Files Employee/
0
1024
by: Shimon | last post by:
Hello, I have encountered strange problem regarding authentication and clustering. This is the scenario: We have an intranet web site with anonymous access, security using forms Auth and impersonate true. Web site is running under domain account (called "natar") and connection to DB done through Trusted connection (with this domain account).
1
1244
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I have a secured folder that is has the following webconfig file ....... <authorization> <deny users="?" /> <allow roles="Admin" /> <allow roles="User" /> </authorization> ........ Whenever I add a user, I use a script to add a user to "User" role. ie
25
3015
by: p byers | last post by:
Good Morning Folks I have a LAN Among the several connections to it are the following four devices: A MAXSTOR network Storage Device A PC running Microsoft Windows 2000 Server 5.0.2195 (SP4) A PC running Microsoft Windows XP Professional 5.1.2600 (SP2) A PC running Microsoft Windows XP Professional 5.1.2600 (SP2) All of the PCs are running IIS
0
10254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.